/* ============ 设计变量 ============ */
:root {
  --rail-bg: #17191f;
  --rail-bg-hover: #232732;
  --rail-active: #2470f0;
  --sub-bg: #ffffff;
  --content-bg: #f2f4f8;
  --primary: #2470f0;
  --primary-light: #eaf1ff;
  --text-1: #303133;
  --text-2: #606266;
  --text-3: #909399;
  --border: #ebeef5;
  --radius: 10px;
  --success: #19b36b;
  --warning: #f0a020;
  --danger: #f04b4b;
  --shadow: 0 2px 10px rgba(15, 30, 70, 0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text-1);
  background: var(--content-bg);
  -webkit-font-smoothing: antialiased;
}

#app { height: 100%; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d7dce5; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #c3cad6; }
::-webkit-scrollbar-track { background: transparent; }

/* ============ 登录页 ============ */
.login-page {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(120deg, #3f3ad8 0%, #3b5bf0 45%, #5b7bf5 100%);
  overflow: hidden;
}

.login-page::before,
.login-page::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}
.login-page::before { width: 620px; height: 620px; left: -180px; top: -220px; }
.login-page::after { width: 480px; height: 480px; right: -120px; bottom: -160px; }

.login-inner {
  position: relative;
  z-index: 1;
  width: 1080px;
  max-width: 92vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.login-brand { color: #fff; flex: 1; }
.login-brand h1 {
  font-size: 46px;
  letter-spacing: 2px;
  margin: 0 0 18px;
  font-weight: 800;
}
.login-brand p { font-size: 20px; line-height: 1.7; opacity: 0.92; margin: 0; }
.login-brand .brand-tags { margin-top: 34px; display: flex; gap: 12px; }
.login-brand .brand-tags span {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
}

.login-card {
  width: 420px;
  background: #fff;
  border-radius: 14px;
  padding: 40px 40px 32px;
  box-shadow: 0 24px 60px rgba(10, 20, 60, 0.28);
}
.login-card h2 {
  text-align: center;
  font-size: 24px;
  margin: 0 0 26px;
  font-weight: 700;
}
.login-card .el-input__wrapper {
  box-shadow: 0 0 0 1px #dcdfe6 inset;
  border-radius: 8px;
  padding: 6px 12px;
}
.login-card .hint {
  color: var(--text-3);
  font-size: 13px;
  margin: 4px 0 18px;
}
.login-card .el-button--primary {
  width: 100%;
  height: 44px;
  font-size: 16px;
  border-radius: 8px;
  background: linear-gradient(90deg, #4b8dff, #2470f0);
  border: none;
}

/* 登录/注册表单细节 */
.login-card h2 { text-align: left; margin-bottom: 6px; }
.login-card .sub { color: var(--text-3); font-size: 13px; margin: 0 0 18px; }
.login-card .field-label {
  font-size: 13px; color: #303133; font-weight: 600; margin: 14px 0 6px;
}
.login-card .field-tip { font-size: 12px; color: var(--text-3); margin-top: 5px; line-height: 1.5; }
.login-card .check-tip { font-size: 12px; margin-top: 5px; }
.login-card .check-tip.ok { color: #19b36b; }
.login-card .check-tip.bad { color: #e5484d; }
.login-card .captcha-img {
  height: 40px; width: 120px; flex: 0 0 120px; cursor: pointer;
  border-radius: 6px; border: 1px solid #e4e8f0; object-fit: cover;
}
.login-card .submit-btn { margin-top: 22px; }
.login-card .login-links {
  margin-top: 16px; display: flex; align-items: center; justify-content: center;
  gap: 10px; font-size: 13px; color: var(--text-3);
}
.login-card .login-links a { color: var(--primary); cursor: pointer; }
.login-card .login-links a:hover { text-decoration: underline; }
.login-card .divider { color: #dcdfe6; }

.email-warn {
  background: #fdf6e3; border: 1px solid #f5e2b3; color: #8a6d3b;
  border-radius: 6px; padding: 12px 14px; font-size: 13px; line-height: 1.6;
  margin-bottom: 16px;
}

/* ============ 主框架 ============ */
.app-shell { display: flex; height: 100%; }

.rail {
  width: 76px;
  flex: 0 0 76px;
  background: var(--rail-bg);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding-bottom: 12px;
  z-index: 20;
}

.rail-logo {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: #7ea6ff;
  letter-spacing: 1px;
}

.rail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 58px;
  cursor: pointer;
  color: #c9d1e0;
  font-size: 12px;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.rail-item:hover { background: var(--rail-bg-hover); color: #fff; }
.rail-item.active { background: var(--rail-active); color: #fff; }
.rail-item .el-icon { font-size: 19px; }

.side-panel {
  width: 176px;
  flex: 0 0 176px;
  background: var(--sub-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.side-title {
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  font-weight: 600;
  font-size: 15px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.side-menu { padding: 8px 10px; overflow: auto; }
.side-menu-item {
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text-2);
  cursor: pointer;
  font-size: 14px;
  margin-bottom: 2px;
  position: relative;
  transition: background 0.15s, color 0.15s;
}
.side-menu-item:hover { background: #f5f7fb; color: var(--text-1); }
.side-menu-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.side-menu-item.active::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 16px;
  border-radius: 2px;
  background: var(--primary);
}

.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.body-row { flex: 1; min-height: 0; display: flex; }

.topbar {
  height: 56px;
  flex: 0 0 56px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}
.topbar-left { display: flex; align-items: center; gap: 12px; color: var(--text-2); }
.topbar-left .collapse-btn { cursor: pointer; font-size: 18px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-right .vip-btn {
  background: #1f2126;
  color: #f5d48a;
  border: none;
  border-radius: 16px;
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
}
.topbar-right .user {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-1);
}

.content {
  flex: 1;
  overflow: auto;
  padding: 18px;
}

/* ============ 通用卡片 ============ */
.panel {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  margin-bottom: 16px;
}
.panel-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.toolbar .spacer { flex: 1; }

.alert-bar {
  background: #ecf5ff;
  border: 1px solid #d9ecff;
  color: #4a7fd4;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 14px;
}
.alert-bar b { color: var(--primary); }

/* ============ 首页 ============ */
.hero {
  position: relative;
  border-radius: 14px;
  padding: 34px 40px;
  color: #fff;
  overflow: hidden;
  background: radial-gradient(120% 140% at 10% 0%, #2c2f36 0%, #15171b 60%, #0e0f12 100%);
  margin-bottom: 16px;
}
.hero h1 {
  margin: 0;
  font-size: 36px;
  letter-spacing: 2px;
  background: linear-gradient(90deg, #f7e3b0, #d9b46a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}
.hero .sub { margin-top: 8px; opacity: 0.75; letter-spacing: 6px; font-size: 15px; }
.hero .welcome { margin-top: 22px; font-size: 18px; opacity: 0.9; }
.hero::after {
  content: "";
  position: absolute;
  right: -40px; top: -40px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 160, 255, 0.28), transparent 65%);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

/* 统计页：环比颜色 */
.ratio { font-weight: 600; }
.ratio.up { color: #e5484d; }
.ratio.down { color: #19b36b; }
.ratio.flat { color: #909399; }

/* 权益页 */
.steps { display: flex; gap: 10px; margin-bottom: 16px; }
.steps .step {
  flex: 1; background: #fff; border-radius: var(--radius); padding: 14px 18px;
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  box-shadow: var(--shadow); color: #606266; font-weight: 500;
}
.steps .step .n {
  width: 22px; height: 22px; border-radius: 50%; background: #eef2fa; color: #2470f0;
  display: flex; align-items: center; justify-content: center; font-size: 12px;
}
.steps .step.active { background: var(--primary); color: #fff; }
.steps .step.active .n { background: rgba(255,255,255,.25); color: #fff; }

.benefit-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.benefit-item { background: #f8fafd; border-radius: 10px; padding: 14px 16px; }
.benefit-item .k { color: #909399; font-size: 12px; margin-bottom: 6px; }
.benefit-item .v { font-size: 17px; font-weight: 600; color: #303133; }

.feat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.feat-item {
  display: flex; align-items: center; gap: 6px; padding: 10px 12px;
  background: #f8fafd; border-radius: 8px; font-size: 13px; color: #303133;
}
.feat-item.off { color: #909399; background: #fafafa; }

.plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.plan-card {
  position: relative; border: 1px solid #e8ecf3; border-radius: 12px; padding: 18px;
  cursor: pointer; transition: all .15s;
}
.plan-card:hover { border-color: var(--primary); }
.plan-card.chosen { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(36,112,240,.12); }
.plan-card .badge {
  position: absolute; top: -1px; right: -1px; background: #e5484d; color: #fff;
  font-size: 11px; padding: 2px 8px; border-radius: 0 12px 0 10px;
}
.plan-card .plan-name { font-weight: 600; color: #303133; }
.plan-card .plan-remark { color: #909399; font-size: 12px; margin-top: 4px; }
.plan-card .plan-price { margin: 12px 0 4px; }
.plan-card .plan-price .now { color: #e5484d; font-size: 22px; font-weight: 700; }
.plan-card .plan-price .old { color: #c0c4cc; text-decoration: line-through; margin-left: 6px; font-size: 13px; }
.plan-card .plan-meta { color: #606266; font-size: 12px; }
.plan-card .plan-feat { color: #909399; font-size: 12px; margin-top: 6px; }

/* 升级折算说明 */
.proration-box {
  margin-top: 16px; padding: 16px 18px; border-radius: 10px;
  background: #f6f9ff; border: 1px solid #dce8ff;
}
.proration-title { font-weight: 600; color: #3a5c9a; margin-bottom: 12px; }
.proration-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.proration-grid .k { color: #8a9bb8; font-size: 12px; margin-bottom: 4px; }
.proration-grid .v { font-size: 18px; font-weight: 600; color: #303133; }
.proration-rule { margin-top: 12px; color: #3a5c9a; font-size: 13px; line-height: 1.7; }
.proration-formula { margin-top: 6px; color: #8a9bb8; font-size: 12px; }

/* 主页公告 */
.notice-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: 8px; cursor: pointer;
}
.notice-item:hover { background: #f8fafd; }
.notice-item .notice-title { display: flex; align-items: center; font-size: 14px; color: #303133; }
.notice-item .notice-meta { color: #909399; font-size: 12px; }
.tag-blue { background: #eaf1ff; color: #2470f0; }
.tag-orange { background: #fff4e5; color: #e08a00; }
.tag-red { background: #ffecec; color: #e5484d; }
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 14px;
}
.stat-card .icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  background: var(--primary-light);
  color: var(--primary);
}
.stat-card .label { color: var(--text-3); font-size: 13px; }
.stat-card .value { font-size: 24px; font-weight: 700; margin-top: 2px; }
.stat-card .value small { font-size: 13px; font-weight: 400; color: var(--text-3); margin-left: 4px; }

.module-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.module-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  background: #fff;
}
.module-card:hover { border-color: #c7d9ff; box-shadow: 0 6px 18px rgba(36, 112, 240, 0.12); transform: translateY(-1px); }
.module-card .ico { font-size: 22px; margin-bottom: 8px; }
.module-card .t { font-size: 13px; color: var(--text-2); }

.two-col { display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; }

/* ============ 表格微调 ============ */
.el-table th.el-table__cell {
  background: #f7f9fc !important;
  color: var(--text-2);
  font-weight: 600;
}
.el-table { --el-table-border-color: #f0f2f5; font-size: 13px; }
.el-table .cell { line-height: 1.5; }

.tag-soft {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 20px;
}
.tag-blue { background: #eaf1ff; color: #2470f0; }
.tag-green { background: #e7f8ef; color: #19b36b; }
.tag-orange { background: #fff4e5; color: #e08a00; }
.tag-red { background: #feedee; color: #e5484d; }
.tag-gray { background: #f2f3f5; color: #7a8290; }

.empty-block {
  padding: 60px 0;
  text-align: center;
  color: var(--text-3);
}

.code-box {
  background: #f7f9fc;
  border: 1px dashed #d9e1ef;
  border-radius: 8px;
  padding: 12px 14px;
  font-family: Consolas, Monaco, monospace;
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-all;
  color: #2a3a55;
}

.split-line { height: 1px; background: var(--border); margin: 14px 0; }

.row-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.role-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  border-left: 3px solid var(--primary);
}
.role-card .role-name { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.role-card .role-desc { color: var(--text-3); font-size: 13px; line-height: 1.7; }

.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.page-head h2 { margin: 0; font-size: 18px; font-weight: 700; }

@media (max-width: 1280px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .module-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .side-panel { display: none; }
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-inner { flex-direction: column; gap: 30px; }
  .login-brand { text-align: center; }
  .login-brand h1 { font-size: 30px; }
}
