/* ===== 全局 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Source Han Sans SC", "Noto Sans SC", -apple-system, sans-serif;
  background: linear-gradient(135deg, rgba(230,239,255,1) 0%, rgba(255,255,255,1) 100%);
  min-height: 100vh;
  color: #1a1a2e;
}

.top-bar { height: 5px; background: linear-gradient(135deg, #00D4FF 0%, #0066FF 100%); }

/* ===== 布局 ===== */
.app-layout { display: flex; min-height: calc(100vh - 5px); }

/* ===== 左侧导航 ===== */
.sidebar {
  width: 240px;
  background: #fff;
  border-right: 1px solid rgba(0,102,255,0.08);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  padding: 20px 20px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(0,102,255,0.06);
}

.logo-dot { width: 14px; height: 14px; background: #00D4FF; border-radius: 50%; }

.logo-text {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, #00D4FF, #0066FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-list { flex: 1; padding: 12px 8px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 4px;
  transition: background 0.15s;
}

.nav-item:hover { background: rgba(0,102,255,0.04); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(0,212,255,0.08), rgba(0,102,255,0.08));
  border-left: 3px solid #0066FF;
}

.nav-icon { font-size: 16px; }
.nav-label { font-size: 14px; flex: 1; }
.nav-label-sub { font-size: 11px; color: #aaa; margin-left: 4px; }

.badge {
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

.badge:empty, .badge[data-count="0"] { display: none; }

.sidebar-footer {
  padding: 16px 20px;
  font-size: 12px;
  color: #bbb;
  border-top: 1px solid rgba(0,102,255,0.06);
}

/* ===== 右侧内容区 ===== */
.main-content { flex: 1; padding: 32px 40px; max-width: 900px; }
.view { display: block; }
.view.hidden { display: none; }

.view-header { margin-bottom: 24px; }
.view-header h2 { font-size: 22px; font-weight: 600; margin-bottom: 4px; }
.view-desc { font-size: 14px; color: #888; }

/* ===== 上传卡片 ===== */
.upload-card {
  background: #fff;
  border: 2px dashed rgba(0,102,255,0.25);
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  margin-bottom: 28px;
  cursor: pointer;
  transition: all 0.2s;
}

.upload-card:hover, .upload-card.dragover {
  border-color: #0066FF;
  background: rgba(0,102,255,0.02);
}

.upload-icon { margin-bottom: 12px; }
.upload-card h3 { font-size: 18px; margin-bottom: 8px; }
.upload-hint { font-size: 13px; color: #999; line-height: 1.7; margin-bottom: 20px; }

/* ===== 按钮 ===== */
.btn-primary {
  background: linear-gradient(135deg, #00D4FF, #0066FF);
  color: #fff;
  border: none;
  padding: 10px 28px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,102,255,0.25); }

.btn-secondary {
  background: #fff;
  color: #0066FF;
  border: 1px solid rgba(0,102,255,0.3);
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}

/* ===== 区块 ===== */
.section { margin-bottom: 28px; }
.section-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; color: #333; }
.empty-hint { color: #ccc; font-size: 14px; padding: 20px 0; }

/* ===== 任务列表 ===== */
.task-list { display: flex; flex-direction: column; gap: 8px; }

.task-item {
  background: #fff;
  border: 1px solid rgba(0,102,255,0.1);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color 0.15s;
  cursor: pointer;
}

.task-item:hover { border-color: rgba(0,102,255,0.3); }
.task-icon { font-size: 18px; }
.task-info { flex: 1; }
.task-title { font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.task-meta { font-size: 12px; color: #999; }

.task-status {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 500;
}

.task-status.pending { background: #fef9c3; color: #ca8a04; }
.task-status.processing { background: #dbeafe; color: #2563eb; }
.task-status.done { background: #dcfce7; color: #16a34a; }

/* ===== 卡片 ===== */
.card {
  background: #fff;
  border: 1px solid rgba(0,102,255,0.1);
  border-radius: 12px;
  margin-bottom: 20px;
  overflow: hidden;
}

.card-header {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,102,255,0.06);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header h3 { font-size: 14px; }
.card-dot { width: 12px; height: 12px; background: #00D4FF; border-radius: 50%; }
.card-body { padding: 16px; font-size: 14px; line-height: 1.7; color: #444; }
.placeholder { color: #ccc; }

/* ===== 任务清单 ===== */
.task-checklist { list-style: none; }
.task-checklist li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,102,255,0.05);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
}
.task-checklist li:last-child { border-bottom: none; }
.task-checklist .check-icon { margin-top: 2px; font-size: 14px; }
.task-checklist .done-text { color: #16a34a; }
.task-checklist .pending-text { color: #999; }

/* ===== 弹窗 ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-overlay.hidden { display: none; }

.modal {
  background: #fff;
  border-radius: 12px;
  width: 560px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0,102,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 { font-size: 16px; }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: #999; }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; font-size: 14px; line-height: 1.8; }
.modal-footer { padding: 14px 20px; border-top: 1px solid rgba(0,102,255,0.08); display: flex; justify-content: flex-end; gap: 8px; }

/* ===== 进度条 ===== */
.progress-bar {
  display: flex;
  height: 24px;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 8px;
  gap: 2px;
}

.progress-seg {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  border-radius: 4px;
}

.progress-seg.done { background: #22c55e; }
.progress-seg.pending { background: #ef4444; }

/* ===== Loading Spinner ===== */
.loading-spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(0,102,255,0.15);
  border-top-color: #0066FF;
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 0.8s linear infinite;
}

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

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .sidebar { width: 60px; }
  .nav-label, .nav-label-sub, .sidebar-footer span { display: none; }
  .main-content { padding: 20px; }
}

.btn-small {
  padding: 3px 10px;
  font-size: 12px;
  border: 1px solid #0066FF;
  background: #fff;
  color: #0066FF;
  border-radius: 4px;
  cursor: pointer;
  margin-left: 8px;
}
.btn-small:hover { background: #e6f0ff; }
