/* 全局样式 */
* { box-sizing: border-box; }
html, body, #app {
  height: 100%;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f7fa;
  color: #303133;
}

/* 登录页 */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff8c00 0%, #ffb347 100%);
  position: relative;
}
.login-box {
  background: #fff;
  padding: 40px 50px;
  border-radius: 12px;
  width: 380px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.login-title {
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  color: #ff8c00;
  margin-bottom: 6px;
}
.login-subtitle {
  text-align: center;
  color: #909399;
  font-size: 13px;
  margin-bottom: 30px;
}
.api-config-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  opacity: 0.85;
}
.api-config-btn:hover { opacity: 1; }

/* 主框架 */
.layout-container {
  display: flex;
  height: 100vh;
}
.sidebar {
  width: 220px;
  background: #2c3e50;
  color: #fff;
  display: flex;
  flex-direction: column;
}
.sidebar-logo {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  border-bottom: 1px solid #1e2c3a;
  background: #1e2c3a;
}
.sidebar-logo .dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff8c00, #ffd700);
  margin-right: 8px;
}
.menu-item {
  padding: 14px 22px;
  cursor: pointer;
  border-left: 3px solid transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #c8d3e0;
}
.menu-item:hover { background: #34495e; color: #fff; }
.menu-item.active {
  background: #34495e;
  border-left-color: #ff8c00;
  color: #fff;
}
.menu-badge {
  background: #f56c6c;
  color: #fff;
  border-radius: 10px;
  padding: 0 8px;
  font-size: 11px;
  margin-left: auto;
}

.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.header-bar {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid #ebeef5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}
.header-bar .breadcrumb {
  font-size: 16px;
  color: #303133;
  font-weight: 600;
}
.header-bar .user-info {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: #606266;
}

.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* 卡片 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.stat-card {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border-left: 4px solid #ff8c00;
}
.stat-card.warn { border-left-color: #e6a23c; }
.stat-card.info { border-left-color: #409eff; }
.stat-card.success { border-left-color: #67c23a; }
.stat-card.danger { border-left-color: #f56c6c; }
.stat-card .label {
  font-size: 13px;
  color: #909399;
  margin-bottom: 8px;
}
.stat-card .value {
  font-size: 26px;
  font-weight: 700;
  color: #303133;
}
.stat-card .extra {
  font-size: 12px;
  color: #909399;
  margin-top: 6px;
}

.section-card {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  border-left: 3px solid #ff8c00;
  padding-left: 10px;
}

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

.screenshot-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  margin: 2px;
  border: 1px solid #ebeef5;
}

.task-type-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 12px;
  border-radius: 3px;
  background: #ecf5ff;
  color: #409eff;
}
.task-type-tag.comment { background: #fdf6ec; color: #e6a23c; }
.task-type-tag.share { background: #f0f9eb; color: #67c23a; }
.task-type-tag.watch { background: #f4f4f5; color: #909399; }

/* ===== 系统配置（旧版样式保留供兼容，主要使用 .config-group/.config-item 新版） ===== */
.config-row {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed #ebeef5;
  gap: 14px;
}
.config-row:last-child { border-bottom: none; }
.config-row .key {
  width: 220px;
  font-weight: 600;
  color: #303133;
}
.config-row .desc {
  flex: 1;
  color: #909399;
  font-size: 13px;
}
.config-row .value {
  width: 240px;
}

/* ===== 系统配置 - 分组卡片 ===== */
.config-group {
  margin-top: 18px;
  border: 1px solid #ebeef5;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.config-group:first-of-type { margin-top: 8px; }

.config-group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(90deg, #fff7e6 0%, #fffaf0 100%);
  border-bottom: 1px solid #ebeef5;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}
.config-group-header:hover {
  background: linear-gradient(90deg, #ffefd5 0%, #fff5e6 100%);
}
.config-group-title {
  font-size: 16px;
  font-weight: 700;
  color: #303133;
  flex-shrink: 0;
}
.config-group-desc {
  flex: 1;
  font-size: 13px;
  color: #909399;
}
.config-group-arrow {
  font-size: 14px;
  color: #ff8c00;
  font-weight: 700;
}

.config-group-body {
  padding: 4px 0;
}
.config-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px dashed #ebeef5;
  transition: background 0.15s;
}
.config-item:last-child { border-bottom: none; }
.config-item:hover { background: #fafafa; }
.config-item.dirty {
  background: #fff7e6;
  border-left: 3px solid #ff8c00;
  padding-left: 15px;
}
.config-item-info {
  flex: 1;
  min-width: 0; /* 允许 flex 收缩 */
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.config-item-desc {
  font-size: 14px;
  font-weight: 600;
  color: #303133;
  line-height: 1.4;
}
.config-item-key {
  font-size: 12px;
  color: #c0c4cc;
  font-family: 'Consolas', 'Monaco', monospace;
  word-break: break-all; /* 长 key 不溢出 */
}
.config-item-value {
  width: 240px;
  flex-shrink: 0;
}
