/* 全局样式 */
:root {
  --primary-color: #2c69d1;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f7fb;
  min-height: 100vh;
}

/* 登录和注册页面样式 */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.auth-page .card {
  max-width: 400px;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
}

.auth-page .card-header {
  padding: 20px;
}

/* 加载指示器样式 */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner-container {
  text-align: center;
}

/* 侧边栏样式 */
.sidebar {
  background-color: var(--dark-color);
  min-height: 100vh;
  color: white;
  position: fixed;
  width: 250px;
  transition: all 0.3s;
  z-index: 1000;
}

.sidebar-header {
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.2);
}

.sidebar .nav-link {
  color: #ddd;
  padding: 10px 15px;
  margin: 5px 15px;
  border-radius: 5px;
  display: flex;
  align-items: center;
}

.sidebar .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.sidebar .nav-link.active {
  background-color: var(--primary-color);
  color: white;
}

.sidebar .nav-link i {
  margin-right: 10px;
}

/* 主内容区样式 */
.main-content {
  transition: all 0.3s;
  padding: 20px;
}

.sidebar-active .main-content {
  margin-left: 250px;
}

/* 卡片样式 */
.stat-card {
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
  background-color: white;
  height: 100%;
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-card .card-body {
  padding: 25px;
}

.stat-card .icon {
  font-size: 2.5rem;
  opacity: 0.8;
}

.stat-card .stat-value {
  font-size: 1.8rem;
  font-weight: bold;
}

.stat-card .stat-label {
  color: #6c757d;
  font-size: 0.9rem;
}

/* 表格样式 */
.table-container {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 20px;
  overflow-x: auto;
}

.table th {
  background-color: #f8f9fa;
}

/* 响应式调整 */
@media (max-width: 991.98px) {
  .sidebar {
    margin-left: -250px;
  }
  
  .sidebar.active {
    margin-left: 0;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .sidebar-toggle {
    display: block !important;
  }
}

/* 动作按钮样式 */
.action-buttons .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

/* 状态标签样式 */
.status-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 50rem;
}

.status-pending {
  background-color: #f8f9fa;
  color: #6c757d;
}

.status-approved {
  background-color: #d1e7dd;
  color: #0f5132;
}

.status-rejected {
  background-color: #f8d7da;
  color: #842029;
}

.status-completed {
  background-color: #cfe2ff;
  color: #084298;
}

/* 表单样式 */
.form-container {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 25px;
}

/* 用户详情页样式 */
.user-header {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 25px;
  margin-bottom: 20px;
}

.user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #6c757d;
}

/* 地址格式化 */
.address {
  font-family: monospace;
  word-break: break-all;
}

.address-truncate {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 页面切换动画 */
.fade-enter {
  opacity: 0;
}

.fade-enter-active {
  opacity: 1;
  transition: opacity 0.3s;
}

.fade-exit {
  opacity: 1;
}

.fade-exit-active {
  opacity: 0;
  transition: opacity 0.3s;
}
