/* ===== 全局 ===== */
* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; padding: 0; }
body {
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  background: #f5f7fa;
  color: #303133;
}

/* ===== 登录页 ===== */
.login-wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1f6feb 0%, #6e40c9 55%, #b02a6f 100%);
}
.login-card {
  width: 400px;
  padding: 42px 38px 34px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
}
.login-title {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #1f2d3d;
}
.login-sub {
  text-align: center;
  color: #8a919f;
  font-size: 13px;
  margin-bottom: 26px;
}

/* ===== 主布局 ===== */
.layout-aside {
  width: 216px;
  background: #1d2735;
  display: flex;
  flex-direction: column;
}
.brand {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1px;
  background: #141c27;
  flex-shrink: 0;
}
.layout-aside .el-menu {
  border-right: none;
  flex: 1;
}
.aside-foot {
  padding: 12px 14px;
  color: #5e6d82;
  font-size: 12px;
  flex-shrink: 0;
}
.layout-header {
  height: 60px;
  background: #fff;
  border-bottom: 1px solid #e8ebf0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
}
.header-left { display: flex; align-items: center; gap: 14px; font-size: 15px; font-weight: 600; }
.header-right { display: flex; align-items: center; gap: 16px; }
.quota-badge { display: flex; align-items: center; gap: 6px; }

.layout-main {
  padding: 18px 22px;
  overflow-y: auto;
  background: #f5f7fa;
}
.page-card { background: #fff; border-radius: 10px; padding: 18px 20px; }
.mb14 { margin-bottom: 14px; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }
.page-title { font-size: 17px; font-weight: 700; margin: 0 0 4px; }
.page-desc { color: #8a919f; font-size: 13px; margin: 0 0 14px; }

/* ===== 仪表盘 ===== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.stat-card {
  background: #fff;
  border-radius: 10px;
  padding: 18px 20px;
  border-left: 4px solid #409eff;
}
.stat-card .num { font-size: 28px; font-weight: 700; line-height: 1.2; }
.stat-card .lbl { color: #8a919f; font-size: 13px; margin-top: 4px; }
.stat-card.green { border-left-color: #67c23a; }
.stat-card.orange { border-left-color: #e6a23c; }
.stat-card.red { border-left-color: #f56c6c; }
.stat-card.purple { border-left-color: #9a6fe0; }

/* ===== 关键词排名页（下拉选择 + 域名排行）===== */
.kw-select-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 16px; padding: 14px 16px;
  background: #f7f9fc; border: 1px solid #ebeef5; border-radius: 10px;
}
.kw-select-label { font-weight: 600; color: #303133; font-size: 14px; }
.kw-select-bar .spacer { flex: 1; }
.rank-card { border: 1px solid #ebeef5; border-radius: 10px; }
.rank-head { display: flex; align-items: center; justify-content: space-between; }
.rank-head-title { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #303133; }
.rank-kw { color: #409EFF; font-weight: 700; margin-left: 2px; }
.rank-count { color: #909399; font-size: 12px; }
.rank-badge { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 11px; font-size: 12px; font-weight: 700; color: #fff; }
.rank-0 { background: #e6a23c; }
.rank-1 { background: #909399; }
.rank-2 { background: #cd7f32; }
.rank-3 { background: #c0c4cc; }
.rank-pos { margin-left: 6px; color: #606266; font-weight: 600; }
.rank-unknown { color: #c0c4cc; }

/* ===== 任务详情 ===== */
.detail-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.log-box {
  background: #0e1621;
  color: #c9d6e3;
  border-radius: 8px;
  padding: 14px 16px;
  height: 460px;
  overflow-y: auto;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12.5px;
  line-height: 1.75;
}
.log-line { white-space: pre-wrap; word-break: break-all; }
.log-line .t { color: #5d7a9b; margin-right: 8px; }
.log-line.ok { color: #7ce38b; }
.log-line.warn { color: #f2c069; }
.log-line.err { color: #ff8189; }
.log-line.sys { color: #8fb5ff; }
.log-empty { color: #5d7a9b; text-align: center; padding-top: 180px; }
/* 任务详情 - 实时状态卡片 */
.live-card { background: #f7f9fc; border: 1px solid #e3e8f0; border-radius: 8px; padding: 12px 16px; margin-top: 12px; }
.live-title { font-size: 14px; font-weight: 600; color: #303133; margin-bottom: 10px; }
.live-sub { font-size: 12px; color: #8a919f; font-weight: 400; }
.live-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 18px; }
.live-item { background: #fff; border: 1px solid #ebeef5; border-radius: 6px; padding: 8px 12px; }
.live-lbl { font-size: 12px; color: #8a919f; margin-bottom: 4px; }
.live-val { font-size: 14px; color: #303133; font-weight: 600; word-break: break-all; }
.live-val.hl { color: #409eff; }
@media (max-width: 760px) { .live-grid { grid-template-columns: repeat(2, 1fr); } }
</style>
