/* ========== 全局重置 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #f0f2f5;
}

/* ========== 侧边栏 ========== */
.app-sidebar {
  background-color: #304156;
  overflow: hidden;
}

.sidebar-header {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}

.app-sidebar .el-menu {
  border-right: none;
}

/* ========== 顶栏 ========== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid #e6e6e6;
  padding: 0 20px;
  height: 60px;
}

.header-title {
  font-size: 16px;
  font-weight: 500;
  color: #303133;
}

.header-right {
  display: flex;
  align-items: center;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #606266;
  font-size: 14px;
}

.user-info:hover {
  color: #409eff;
}

/* ========== 主内容区 ========== */
.app-main {
  background: #f0f2f5;
  padding: 20px;
  overflow-y: auto;
}

/* ========== 登录页 ========== */
.login-container {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
  width: 400px;
  padding: 40px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.login-card h2 {
  text-align: center;
  margin-bottom: 8px;
  color: #303133;
  font-size: 22px;
}

.login-card .login-subtitle {
  text-align: center;
  margin-bottom: 30px;
  color: #909399;
  font-size: 14px;
}

.login-card .el-button {
  width: 100%;
}

/* ========== 通用卡片 ========== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.page-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #303133;
}

/* ========== 统计卡片 ========== */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #303133;
  margin-bottom: 4px;
}

.stat-card .stat-label {
  font-size: 14px;
  color: #909399;
}

.stat-card .stat-icon {
  float: right;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.stat-card .stat-icon.icon-primary {
  background: linear-gradient(135deg, #409eff 0%, #66b1ff 100%);
}

.stat-card .stat-icon.icon-success {
  background: linear-gradient(135deg, #67c23a 0%, #85ce61 100%);
}

.stat-card .stat-icon.icon-warning {
  background: linear-gradient(135deg, #e6a23c 0%, #ebb563 100%);
}

.stat-card .stat-icon.icon-danger {
  background: linear-gradient(135deg, #f56c6c 0%, #f78989 100%);
}

/* ========== 状态标签 ========== */
.status-success {
  color: #67c23a;
}

.status-partial {
  color: #e6a23c;
}

.status-fail {
  color: #f56c6c;
}

/* ========== 搜索/筛选区域 ========== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  align-items: center;
}

.filter-bar .el-input {
  width: 200px;
}

.filter-bar .el-select {
  width: 150px;
}

/* ========== JSON 格式化 ========== */
.json-viewer {
  background: #f5f7fa;
  border: 1px solid #e4e7ed;
  border-radius: 4px;
  padding: 12px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 400px;
  overflow-y: auto;
}

/* ========== 响应式 ========== */
@media (max-width: 1200px) {
  .stat-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .stat-cards {
    grid-template-columns: 1fr;
  }
  .filter-bar .el-input,
  .filter-bar .el-select {
    width: 100%;
  }
}