/* 开发者仪表板专用样式 */
:root {
  --dashboard-bg: #fafbfc;
  --card-bg: #ffffff;
  --border-color: #dfe1e6;
  --primary-color: #0f6cbd;
  --secondary-color: #5c6b7f;
  --success-color: #0e7a0d;
  --warning-color: #ffaa44;
  --danger-color: #d83b3b;
  --text-primary: #242424;
  --text-secondary: #5c6b7f;
  --sidebar-width: 260px;
  --header-height: 70px;
  --transition: all 0.3s ease;
}

/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--dashboard-bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* 布局容器 */
.dashboard-container {
  display: flex;
  min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
  width: var(--sidebar-width);
  background: #f0f2f5;
  color: #242424;
  height: 100vh;
  position: fixed;
  transition: var(--transition);
  z-index: 100;
  border-right: 1px solid #dfe1e6;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid #dfe1e6;
  height: var(--header-height);
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

.sidebar-header h2 {
  font-size: 22px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-header h2 i {
  color: var(--primary-color);
}

.sidebar-menu {
  padding: 12px 0;
}

.sidebar-menu-item {
  padding: 10px 16px;
  margin: 2px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #4a5568;
  text-decoration: none;
  transition: var(--transition);
  font-size: 14px;
  border-radius: 8px;
  border-left: none;
}

.sidebar-menu-item:hover,
.sidebar-menu-item.active {
  background: #e1e4e8;
  color: #0f6cbd;
  border-left: none;
}

.sidebar-menu-item i {
  width: 20px;
  text-align: center;
  font-size: 16px;
}

/* 主内容区域 */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  transition: var(--transition);
}

/* 头部导航 */
.header {
  height: var(--header-height);
  background: #f0f2f5;
  border-bottom: 1px solid #dfe1e6;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  position: sticky;
  top: 0;
  z-index: 99;
}

.header-left h1 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
}

/* 内容区域 */
.content {
  padding: 30px;
}

.page-header {
  margin-bottom: 30px;
}

.page-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 15px;
}

/* 卡片网格 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

/* 响应式：小屏幕改为2列 */
@media (max-width: 1200px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 响应式：超小屏幕改为1列 */
@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* 统计卡片 */
.stat-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.stat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.stat-card-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.stat-card-icon.blue {
  background: rgba(15, 108, 189, 0.1);
  color: #0f6cbd;
}

.stat-card-icon.green {
  background: rgba(14, 122, 13, 0.1);
  color: #0e7a0d;
}

.stat-card-icon.orange {
  background: rgba(255, 170, 68, 0.1);
  color: #ffaa44;
}

.stat-card-icon.purple {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
}

.stat-card-content h3 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--text-primary);
}

.stat-card-content p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* 软件卡片 */
.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
}

.software-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.software-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 10px rgba(0, 0, 0, 0.08);
}

.software-card-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

.software-card-body {
  padding: 20px;
}

.software-card-footer {
  padding: 15px 20px;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
}

.software-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 24px;
  margin-bottom: 15px;
  border: 1px solid #e0e0e0;
}

.software-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.software-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text-primary);
}

.software-version {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 15px;
}

.software-desc {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.software-stats {
  display: flex;
  gap: 15px;
  margin-bottom: 10px;
}

.stat-item {
  flex: 1;
  text-align: center;
  padding: 10px;
  background: #f1f5f9;
  border-radius: 8px;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.btn {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: #0a5a9e;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.btn-outline:hover {
  background: #f0f2f5;
}

.btn-danger {
  background: #d83b3b;
  color: white;
}

.btn-danger:hover {
  background: #b71c1c;
}

.btn-success {
  background: #0e7a0d;
  color: white;
}

.btn-success:hover {
  background: #0b5c0a;
}

.btn-warning {
  background: #ffaa44;
  color: white;
}

.btn-warning:hover {
  background: #e6952f;
}

.btn-sm {
  padding: 4px 12px;
  font-size: 13px;
}

/* 表格样式 */
.table-container {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.table-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.table-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.table-actions {
  display: flex;
  gap: 10px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  background: #f8fafc;
  padding: 15px 20px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 14px;
  border-bottom: 1px solid var(--border-color);
}

.table td {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover {
  background: #f8fafc;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.badge-success {
  background: rgba(14, 122, 13, 0.1);
  color: #0e7a0d;
}

.badge-warning {
  background: rgba(255, 170, 68, 0.1);
  color: #ffaa44;
  border: 1px solid rgba(255, 170, 68, 0.3);
}

.badge-info {
  background: rgba(15, 108, 189, 0.1);
  color: #0f6cbd;
  border: 1px solid #0f6cbd;
}

.badge-danger {
  background: rgba(216, 59, 59, 0.1);
  color: #d83b3b;
}

/* 表单样式 */
.form-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 14px;
}

.form-control {
  width: 100%;
  padding: 8px 15px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(15, 108, 189, 0.1);
}

/* 响应式设计 */
@media (max-width: 780px) {
  .sidebar {
    width: 70px;
  }
  
  .sidebar-header h2 span,
  .sidebar-menu-item span {
    display: none;
  }
  
  .sidebar-menu-item {
    justify-content: center;
    padding: 15px;
  }
  
  .main-content {
    margin-left: 70px;
  }
  
  .card-grid,
  .software-grid {
    grid-template-columns: 1fr;
  }
  
  .header {
    padding: 0 15px;
  }
  
  .content {
    padding: 20px 15px;
  }
  
  .table-responsive {
    overflow-x: auto;
  }
  
  .table {
    min-width: 600px;
  }
}
