/* 共用样式文件 - 亲子研学旅游平台管理后台 */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* CSS变量定义 */
:root {
  /* 核心色彩 - Modern Indigo Palette */
  --primary-color: #4f46e5; /* Indigo 600 */
  --primary-color-hover: #4338ca; /* Indigo 700 */
  --primary-light: #e0e7ff; /* Indigo 100 */
  
  /* 功能色 */
  --success-color: #10b981; /* Emerald 500 */
  --success-bg: #d1fae5;
  --warning-color: #f59e0b; /* Amber 500 */
  --warning-bg: #fef3c7;
  --danger-color: #ef4444; /* Red 500 */
  --danger-bg: #fee2e2;
  
  /* 文本色 */
  --text-color: #111827; /* Gray 900 */
  --text-color-secondary: #6b7280; /* Gray 500 */
  --text-color-placeholder: #9ca3af; /* Gray 400 */
  
  /* 界面基础 */
  --border-color: #e5e7eb; /* Gray 200 */
  --bg-color: #f3f4f6; /* Gray 100 */
  --card-bg: #ffffff;
  --sidebar-bg: rgba(255, 255, 255, 0.9);
  
  /* 布局尺寸 */
  --sidebar-width: 260px;
  --header-height: 64px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  
  /* 阴影系统 */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-primary: 0 4px 14px 0 rgba(79, 70, 229, 0.3);
}

/* 动画定义 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* 重置样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.5;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-color-hover);
}

/* 布局容器 */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 顶部模块菜单 */
.top-nav {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 24px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  box-shadow: var(--shadow-sm);
}

.top-nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-color);
  margin-right: 40px;
}

.top-nav-logo-icon {
  font-size: 24px;
}

.top-nav-modules {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.top-nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  color: var(--text-color-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.top-nav-item:hover {
  background: var(--primary-light);
  color: var(--primary-color);
}

.top-nav-item.active {
  color: var(--primary-color);
  font-weight: 600;
}

.top-nav-item-icon {
  font-size: 16px;
}

.top-nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.top-nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
}

.top-nav-user:hover {
  background: var(--bg-color);
}

.top-nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), #818cf8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.top-nav-user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-color);
}

.top-nav-user-role {
  font-size: 12px;
  color: var(--text-color-secondary);
}

/* 主布局区域 */
.main-layout {
  display: flex;
  margin-top: 56px;
  min-height: calc(100vh - 56px);
}

/* 侧边栏 */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border-color);
  position: fixed;
  left: 0;
  top: 56px;
  bottom: 0;
  overflow-y: auto;
  z-index: 100;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

.sidebar-logo {
  display: none;
}

.sidebar-menu {
  padding: 16px 12px;
}

.menu-group {
  margin-bottom: 24px;
}

.menu-group-title {
  padding: 0 16px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-color-placeholder);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  color: var(--text-color-secondary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--radius-sm);
  margin-bottom: 2px;
  font-weight: 500;
}

.menu-item:hover {
  background-color: var(--primary-light);
  color: var(--primary-color);
  transform: translateX(4px);
}

.menu-item.active {
  background-color: var(--primary-color);
  color: #fff;
  box-shadow: var(--shadow-primary);
}

.menu-item-icon {
  margin-right: 12px;
  font-size: 18px;
  opacity: 0.8;
}

.menu-item.active .menu-item-icon {
  opacity: 1;
}

/* 主内容区 */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
}

/* 顶部导航（页面内） */
.header {
  height: 56px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 99;
}

.header-left {
  display: none;
}

.header-breadcrumb {
  display: none;
}

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

.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.header-user:hover {
  background: var(--bg-color);
}

.header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), #818cf8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}

/* 页面内容 */
.page-content {
  padding: 32px;
  animation: fadeIn 0.5s ease-out;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

.page-header {
  margin-bottom: 32px;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-color);
  letter-spacing: -0.5px;
}

.page-desc {
  color: var(--text-color-secondary);
  font-size: 15px;
}

/* 卡片 */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(229, 231, 235, 0.5);
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(249, 250, 251, 0.5);
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color);
}

.card-body {
  padding: 24px;
}

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

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(229, 231, 235, 0.5);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.stat-card-title {
  font-size: 14px;
  color: var(--text-color-secondary);
  margin-bottom: 12px;
  font-weight: 500;
}

.stat-card-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-color);
  letter-spacing: -1px;
}

.stat-card-trend {
  font-size: 13px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.stat-card-trend.up {
  color: var(--success-color);
}

.stat-card-trend.down {
  color: var(--danger-color);
}

/* 表格 */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  background: var(--card-bg);
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table th,
.data-table td {
  padding: 16px 24px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  background: #f9fafb;
  font-weight: 600;
  color: var(--text-color-secondary);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
}

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

.data-table tr:hover td {
  background: #f9fafb;
}

/* 表单 */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-color);
  font-size: 14px;
}

.form-label.required::after {
  content: '*';
  color: var(--danger-color);
  margin-left: 4px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: all 0.2s;
  background: #fff;
  color: var(--text-color);
  font-family: inherit;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  border-color: #d1d5db;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  gap: 8px;
  line-height: 1.4;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primary-color);
  color: #fff;
  box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
  background: var(--primary-color-hover);
  box-shadow: 0 4px 6px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
  background: #fff;
  color: var(--text-color);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.btn-success {
  background: var(--success-color);
  color: #fff;
}

.btn-success:hover {
  background: #059669;
}

.btn-info {
  background: #0ea5e9;
  color: #fff;
}

.btn-info:hover {
  background: #0284c7;
}

.btn-danger {
  background: var(--danger-color);
  color: #fff;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-group {
  display: flex;
  gap: 12px;
}

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 9999px; /* Pill shape */
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}

.tag-primary {
  background: var(--primary-light);
  color: var(--primary-color);
}

.tag-success {
  background: var(--success-bg);
  color: #059669;
}

.tag-warning {
  background: var(--warning-bg);
  color: #d97706;
}

.tag-danger {
  background: var(--danger-bg);
  color: #dc2626;
}

.tag-default {
  background: #f3f4f6;
  color: var(--text-color-secondary);
}

.tag-offline {
  background: #fef2f2;
  color: #991b1b;
}

/* 状态标签 */
.status-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
}

.status-tag::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 6px;
  background-color: currentColor;
}

.status-online {
  background: var(--success-bg);
  color: #059669;
}

.status-offline {
  background: #f3f4f6;
  color: #6b7280;
}

.status-warning {
  background: var(--warning-bg);
  color: #d97706;
}

.status-danger {
  background: var(--danger-bg);
  color: #dc2626;
}

/* 搜索栏 */
.search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
  padding: 24px;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(229, 231, 235, 0.5);
}

.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-item label {
  color: var(--text-color-secondary);
  font-weight: 500;
  font-size: 14px;
}

.search-actions {
  margin-left: auto;
  display: flex;
  gap: 12px;
}

/* 分页 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 24px 0;
}

.pagination-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  border: 1px solid var(--border-color);
  background: #fff;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 13px;
  color: var(--text-color);
}

.pagination-btn:hover:not(:disabled) {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f9fafb;
}

.pagination-btn.active {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.pagination-info {
  color: var(--text-color-secondary);
  font-size: 13px;
  margin-left: 12px;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 80px 24px;
}

.empty-state-icon {
  font-size: 64px;
  color: #e5e7eb;
  margin-bottom: 24px;
  display: inline-block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.empty-state-text {
  color: var(--text-color-secondary);
  margin-bottom: 32px;
  font-size: 16px;
}

/* 模态框 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease-out;
}

.modal {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.2s ease-out;
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-color);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-color-placeholder);
  transition: color 0.2s;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-color);
}

.modal-body {
  padding: 32px;
}

.modal-footer {
  padding: 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  background: #f9fafb;
}

/* 消息提示 */
.message {
  position: fixed;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  z-index: 2000;
  animation: slideDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: var(--shadow-lg);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

@keyframes slideDown {
  from { opacity: 0; transform: translate(-50%, -40px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.message-success {
  background: var(--success-color);
  color: #fff;
}

.message-error {
  background: var(--danger-color);
  color: #fff;
}

.message-warning {
  background: var(--warning-color);
  color: #fff;
}

/* 图表容器 */
.chart-container {
  width: 100%;
  height: 350px;
}

/* 进度条 */
.progress {
  height: 8px;
  background: #f3f4f6;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--primary-color);
  border-radius: 9999px;
  transition: width 0.5s ease;
}

/* 徽章 */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 9999px;
  background: var(--danger-color);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

/* 快捷操作 */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.quick-action-item {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--border-color);
}

.quick-action-item:hover {
  border-color: var(--primary-color);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.quick-action-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 24px;
  transition: transform 0.2s;
}

.quick-action-item:hover .quick-action-icon {
  transform: scale(1.1);
}

.quick-action-text {
  font-size: 14px;
  color: var(--text-color);
  font-weight: 500;
}

/* Tab切换 */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 32px;
  gap: 32px;
}

.tab-item {
  padding: 12px 0;
  color: var(--text-color-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  font-weight: 500;
}

.tab-item:hover {
  color: var(--primary-color);
}

.tab-item.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

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

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .stat-cards {
    grid-template-columns: 1fr;
  }
  
  .header {
    padding: 0 16px;
  }
  
  .page-content {
    padding: 16px;
  }
}

/* Login Page Enhancement */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4f46e5 0%, #818cf8 100%);
  position: relative;
  overflow: hidden;
}

.login-container::before {
  content: '';
  position: absolute;
  width: 150%;
  height: 150%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 60%);
  top: -25%;
  left: -25%;
}

.login-box {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: 48px;
  width: 420px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  z-index: 10;
}

.login-title h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 8px;
}

/* 详情页 */
.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.detail-info {
  display: flex;
  gap: 24px;
}

.detail-section {
  margin-bottom: 24px;
}

.detail-section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-item-label {
  color: var(--text-color-secondary);
  font-size: 13px;
}

.detail-item-value {
  font-size: 14px;
}

/* 步骤条 */
.steps {
  display: flex;
  margin-bottom: 24px;
}

.step {
  flex: 1;
  display: flex;
  align-items: center;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-color);
  color: var(--text-color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-right: 12px;
}

.step.active .step-number {
  background: var(--primary-color);
  color: var(--white);
}

.step.completed .step-number {
  background: var(--success-color);
  color: var(--white);
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border-color);
  margin: 0 8px;
}

.step.completed + .step .step-line::before {
  background: var(--success-color);
}

/* 时间线 */
.timeline {
  position: relative;
  padding-left: 24px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  padding-bottom: 24px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary-color);
  border: 2px solid var(--white);
}

.timeline-time {
  font-size: 12px;
  color: var(--text-color-secondary);
  margin-bottom: 4px;
}

.timeline-content {
  font-size: 14px;
}

/* 下拉菜单 */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  min-width: 160px;
  z-index: 100;
}

.dropdown-item {
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.dropdown-item:hover {
  background: var(--bg-color);
}

/* 加载状态 */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 隐藏类 */
.hidden {
  display: none !important;
}

/* 文字截断 */
.text-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.text-right {
  text-align: right;
}

/* 间距工具类 */
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.ml-8 { margin-left: 8px; }
.mr-8 { margin-right: 8px; }

.p-16 { padding: 16px; }
.p-24 { padding: 24px; }

/* Flex工具类 */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

/* iframe 子页面样式 - 子页面不需要侧边栏 */
body.iframe-page {
  background: transparent;
}

body.iframe-page .app-container {
  display: block;
}

body.iframe-page .sidebar {
  display: none;
}

body.iframe-page .main-content {
  margin-left: 0;
  min-height: auto;
}

body.iframe-page .header {
  display: none;
}

body.iframe-page .page-content {
  padding: 24px 0;
  max-width: 100%;
}
