/* 盛夏光年 Enternal Summer 培训平台 - 品牌全局样式 */
:root {
  --brand-pink: #ff4d94;
  --brand-pink-light: #ffe4f0;
  --brand-pink-dark: #e0307a;
  --brand-yellow: #ffc107;
  --brand-purple: #b76eff;
  --secondary: #1e1e2f;
  --accent: #ff6b9d;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;
  --bg: #fff5f9;
  --card-bg: #ffffff;
  --text: #2d2d3a;
  --text-muted: #8b8ba3;
  --border: #f0d4e3;
  --sidebar-width: 260px;
  --header-height: 64px;
  --radius: 16px;
  --shadow: 0 2px 12px rgba(255, 77, 148, 0.08);
  --shadow-lg: 0 8px 32px rgba(255, 77, 148, 0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* 侧边栏 */
.sidebar {
  position: fixed;
  left: 0; top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: linear-gradient(180deg, #fff0f5 0%, #ffffff 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s ease;
}

.brand {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: white;
  box-shadow: 0 2px 8px rgba(255, 77, 148, 0.15);
}
.brand-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.brand-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--secondary);
  line-height: 1.3;
}
.brand-name span {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.nav-section {
  padding: 16px 0;
  flex: 1;
  overflow-y: auto;
}
.nav-title {
  padding: 8px 24px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 24px;
  margin: 2px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s;
  cursor: pointer;
}
.nav-item:hover {
  background: var(--brand-pink-light);
  color: var(--brand-pink);
}
.nav-item.active {
  background: linear-gradient(135deg, var(--brand-pink), var(--accent));
  color: white;
  box-shadow: 0 4px 12px rgba(255, 77, 148, 0.3);
}
.nav-item i {
  width: 20px;
  text-align: center;
  font-size: 16px;
}
.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}

.user-bar {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-pink), var(--brand-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
}
.user-info { flex: 1; }
.user-name { font-size: 14px; font-weight: 600; }
.user-role { font-size: 12px; color: var(--text-muted); }

/* 主内容区 */
.main {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

.header {
  height: var(--header-height);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-left { display: flex; align-items: center; gap: 16px; }
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text);
}
.page-title { font-size: 20px; font-weight: 700; }

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.search-box {
  position: relative;
}
.search-box input {
  width: 280px;
  padding: 10px 16px 10px 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}
.search-box input:focus {
  border-color: var(--brand-pink);
  background: white;
  box-shadow: 0 0 0 3px rgba(255, 77, 148, 0.1);
}
.search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.header-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}
.header-icon:hover {
  background: var(--brand-pink-light);
  color: var(--brand-pink);
}
.header-icon .dot {
  position: absolute;
  top: 8px; right: 8px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg);
}

/* 内容容器 */
.content {
  padding: 28px 32px;
}

/* 卡片 */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 77, 148, 0.06);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.card-title {
  font-size: 18px;
  font-weight: 700;
}
.card-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}
.card-action {
  font-size: 13px;
  color: var(--brand-pink);
  font-weight: 600;
  cursor: pointer;
}

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.stat-icon.pink { background: #ffe4f0; color: #ff4d94; }
.stat-icon.green { background: #d1fae5; color: #10b981; }
.stat-icon.orange { background: #fef3c7; color: #f59e0b; }
.stat-icon.purple { background: #f3e8ff; color: #a855f7; }
.stat-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 13px;
  color: var(--text-muted);
}
.stat-change {
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
}
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* 网格布局 */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand-pink), var(--accent));
  color: white;
  box-shadow: 0 4px 12px rgba(255, 77, 148, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-pink-dark), var(--brand-pink));
  transform: translateY(-1px);
}
.btn-success { background: var(--success); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--brand-pink); color: var(--brand-pink); }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.tag-blue { background: #dbeafe; color: #1d4ed8; }
.tag-green { background: #d1fae5; color: #047857; }
.tag-orange { background: #fef3c7; color: #b45309; }
.tag-red { background: #fee2e2; color: #b91c1c; }
.tag-purple { background: #f3e8ff; color: #7c3aed; }
.tag-pink { background: #ffe4f0; color: #be185d; }

/* 进度条 */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-pink), var(--accent));
  border-radius: 4px;
  transition: width 0.5s ease;
}
.progress-fill.success { background: linear-gradient(90deg, #10b981, #34d399); }
.progress-fill.warning { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

/* 表格 */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td { padding: 14px 16px; text-align: left; }
th {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}
td { border-bottom: 1px solid var(--border); }
tr:hover td { background: #fff8fb; }

/* 课程/项目卡片 */
.course-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.course-thumb {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 48px;
  position: relative;
}
.course-thumb .tag {
  position: absolute;
  top: 12px; left: 12px;
}
.course-thumb .duration {
  position: absolute;
  bottom: 12px; right: 12px;
  background: rgba(0,0,0,0.5);
  color: white;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
}
.course-body { padding: 20px; }
.course-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.course-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.course-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 话术卡片 */
.speech-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  border-left: 4px solid var(--brand-pink);
  margin-bottom: 16px;
}
.speech-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.speech-title { font-weight: 700; }
.speech-content {
  background: var(--bg);
  padding: 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
}
.speech-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

/* 模态框 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
  background: white;
  border-radius: var(--radius);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-size: 18px; font-weight: 700; }
.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
}
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Tab */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.tab {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
}
.tab:hover { color: var(--brand-pink); }
.tab.active {
  color: var(--brand-pink);
  border-bottom-color: var(--brand-pink);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* 消息列表 */
.notice-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.notice-item:last-child { border-bottom: none; }
.notice-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.notice-icon.blue { background: #dbeafe; color: #2563eb; }
.notice-icon.green { background: #d1fae5; color: #10b981; }
.notice-icon.orange { background: #fef3c7; color: #f59e0b; }
.notice-icon.red { background: #fee2e2; color: #ef4444; }
.notice-icon.pink { background: #ffe4f0; color: #ff4d94; }
.notice-text { flex: 1; }
.notice-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.notice-desc { font-size: 13px; color: var(--text-muted); }
.notice-time { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* 任务项 */
.task-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg);
  border-radius: 12px;
  margin-bottom: 12px;
}
.task-check {
  width: 22px; height: 22px;
  border: 2px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.task-check.done { background: var(--success); border-color: var(--success); color: white; }
.task-info { flex: 1; }
.task-name { font-weight: 600; margin-bottom: 4px; }
.task-meta { font-size: 12px; color: var(--text-muted); }
.task-deadline {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
}
.task-deadline.urgent { background: #fee2e2; color: var(--danger); }
.task-deadline.normal { background: #ffe4f0; color: var(--brand-pink-dark); }

/* 排行榜样式 */
.rank-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.rank-num {
  width: 32px; text-align: center;
  font-size: 18px; font-weight: 700;
  color: var(--text-muted);
}
.rank-num.top { color: var(--brand-pink); }
.rank-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-pink), var(--brand-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
}
.rank-info { flex: 1; }
.rank-name { font-weight: 600; font-size: 14px; }
.rank-dept { font-size: 12px; color: var(--text-muted); }
.rank-score { font-weight: 700; color: var(--brand-pink); }

/* 证书 */
.cert-card {
  background: linear-gradient(135deg, #ff4d94, #ff85b3);
  border-radius: var(--radius);
  padding: 24px;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cert-card::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 60%);
}
.cert-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.9; }
.cert-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.cert-date { font-size: 13px; opacity: 0.8; margin-bottom: 16px; }

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

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .menu-toggle { display: block; }
  .stats-grid { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .search-box input { width: 160px; }
  .content { padding: 20px; }
}

/* 动画 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.4s ease; }

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