/* 全局样式 */
:root {
  --primary-color: #4f46e5;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --dark-color: #1f2937;
  --light-color: #f9fafb;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--light-color);
}

/* 加载动画 */
#loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner-border {
  width: 3rem;
  height: 3rem;
}

/* 登录页面 */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, #7c3aed 100%);
}

.login-card {
  width: 100%;
  max-width: 400px;
  padding: 2rem;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.login-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

.login-subtitle {
  color: #6b7280;
  margin-bottom: 2rem;
}

/* Dashboard */
.navbar {
  background: white !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sidebar {
  min-height: calc(100vh - 56px);
  background: white;
  border-right: 1px solid #e5e7eb;
  padding: 1rem 0;
}

.sidebar .nav-link {
  color: #6b7280;
  padding: 0.75rem 1.5rem;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  color: var(--primary-color);
  background: #f3f4f6;
  border-left-color: var(--primary-color);
}

.main-content {
  padding: 2rem;
  background: var(--light-color);
  min-height: calc(100vh - 56px);
}

/* 统计卡片 */
.stat-card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--dark-color);
}

.stat-label {
  color: #6b7280;
  font-size: 0.875rem;
}

/* 表格 */
.table-card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.table thead th {
  background: var(--light-color);
  color: #6b7280;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border: none;
}

.table tbody tr {
  border-bottom: 1px solid #e5e7eb;
}

.table tbody tr:last-child {
  border-bottom: none;
}

/* 徽章 */
.badge {
  padding: 0.375rem 0.75rem;
  font-weight: 500;
  border-radius: 0.375rem;
}

/* 按钮 */
.btn {
  padding: 0.625rem 1.25rem;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background: #4338ca;
  border-color: #4338ca;
}

/* 响应式 */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .main-content {
    padding: 1rem;
  }

  .stat-card {
    margin-bottom: 1rem;
  }
}

/* 图表容器 */
.chart-container {
  position: relative;
  height: 300px;
  margin-top: 1rem;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #6b7280;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}
