/* ===== 页面头部 ===== */
.page-header {
  padding: var(--space-6) var(--space-4) var(--space-4);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
}
.page-header__title {
  font-size: var(--font-2xl);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  line-height: var(--lh-tight);
}
.page-header__desc {
  font-size: var(--font-base);
  color: var(--text-tertiary);
  margin-top: var(--space-1);
}

/* ===== 区块标题 ===== */
.section-title {
  font-size: var(--font-md);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  padding: var(--space-5) var(--space-4) var(--space-2);
}

/* ===== 卡片 ===== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin: var(--space-2) var(--space-4);
  box-shadow: var(--shadow-xs);
}
.card--bordered {
  border: 1px solid var(--border-light);
  box-shadow: none;
}

/* ===== 列表行 ===== */
.list-row {
  display: flex;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  min-height: 56px;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--dur-fast) var(--ease-out);
}
.list-row:last-child { border-bottom: none; }
.list-row:hover { background: var(--bg-hover); }
.list-row:active { background: var(--bg-active); }

/* ===== 状态点 ===== */
.status-dot {
  width: 8px; height: 8px;
  border-radius: var(--radius-full);
  display: inline-block; flex-shrink: 0;
}
.status-dot--active  { background: var(--status-active); }
.status-dot--warning { background: var(--status-warning); }
.status-dot--danger  { background: var(--status-danger); }
.status-dot--info    { background: var(--status-info); }
.status-dot--done    { background: var(--status-done); }

/* ===== Tag 标签 ===== */
.tag {
  display: inline-flex; align-items: center; gap: var(--space-1);
  padding: 2px var(--space-2);
  border-radius: var(--radius-xs);
  font-size: var(--font-xs);
  font-weight: var(--fw-medium);
  line-height: 1.5;
}
.tag--green  { background: var(--brand-green-light); color: var(--brand-green); }
.tag--orange { background: var(--accent-orange-light); color: var(--accent-orange); }
.tag--purple { background: var(--accent-purple-light); color: var(--accent-purple); }
.tag--blue   { background: var(--info-bg); color: var(--info); }
.tag--red    { background: var(--danger-bg); color: var(--danger); }
.tag--gray   { background: var(--bg-disabled); color: var(--text-tertiary); }

/* ===== 按钮体系 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  font-size: var(--font-base);
  font-weight: var(--fw-medium);
  border: none; cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}
.btn--primary { background: var(--brand-green); color: var(--text-on-dark); }
.btn--primary:hover  { background: var(--brand-green-hover); }
.btn--primary:active { background: var(--brand-green-active); transform: scale(0.98); }
.btn--primary:disabled { background: var(--text-disabled); cursor: not-allowed; }
.btn--outline { background: transparent; color: var(--brand-green); border: 1px solid var(--brand-green); }
.btn--danger  { background: var(--danger); color: var(--text-on-dark); }
.btn--ghost   { background: transparent; color: var(--text-secondary); }
.btn--block   { width: 100%; }
.btn--sm      { padding: var(--space-2) var(--space-3); font-size: var(--font-sm); min-height: 36px; }

/* ===== 输入框 ===== */
.input {
  width: 100%;
  padding: var(--space-3) var(--space-3);
  border: 1px solid var(--border-base);
  border-radius: var(--radius-sm);
  font-size: var(--font-base);
  color: var(--text-primary);
  background: var(--bg-card);
  transition: border-color var(--dur-fast) var(--ease-out);
  min-height: 44px;
}
.input:focus { outline: none; border-color: var(--brand-green); box-shadow: 0 0 0 3px var(--brand-green-light); }
.input::placeholder { color: var(--text-tertiary); }

/* ===== 进度条 ===== */
.progress { height: 6px; background: var(--bg-disabled); border-radius: var(--radius-full); overflow: hidden; }
.progress__bar { height: 100%; border-radius: var(--radius-full); transition: width var(--dur-slow) var(--ease-out); }
.progress__bar--green  { background: var(--brand-green); }
.progress__bar--orange { background: var(--accent-orange); }
.progress__bar--red    { background: var(--danger); }
.progress__bar--purple { background: var(--accent-purple); }

/* ===== 空状态 ===== */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: var(--space-12) var(--space-6); text-align: center;
}
.empty-state__icon { font-size: 48px; margin-bottom: var(--space-4); opacity: 0.6; }
.empty-state__title { font-size: var(--font-md); font-weight: var(--fw-medium); color: var(--text-secondary); margin-bottom: var(--space-2); }
.empty-state__desc { font-size: var(--font-sm); color: var(--text-tertiary); line-height: var(--lh-relaxed); max-width: 280px; }

/* ===== Toast ===== */
.toast {
  position: fixed; top: var(--space-6); left: 50%;
  transform: translateX(-50%) translateY(-100%);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--font-base); font-weight: var(--fw-medium);
  color: #fff; z-index: 9999;
  box-shadow: var(--shadow-lg);
  transition: transform var(--dur-base) var(--ease-out);
  pointer-events: none;
}
.toast--show { transform: translateX(-50%) translateY(0); }
.toast--success { background: var(--success); }
.toast--error   { background: var(--danger); }
.toast--warning { background: var(--warning); }

/* ===== 骨架屏 ===== */
.skeleton {
  background: linear-gradient(90deg, var(--bg-disabled) 25%, #E8E8EE 50%, var(--bg-disabled) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ===== 搜索框（胶囊形）===== */
.search-bar {
  display: flex; align-items: center; gap: var(--space-2);
  height: 40px; padding: 0 var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  margin: var(--space-3) var(--space-4);
}
.search-bar__icon { font-size: 16px; color: var(--text-tertiary); }
.search-bar__input {
  flex: 1; border: none; outline: none;
  font-size: var(--font-base); color: var(--text-primary);
  background: transparent;
}

/* ===== Tab 栏 ===== */
.tab-bar {
  display: flex;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  padding: 0 var(--space-4);
}
.tab-bar__item {
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-base);
  color: var(--text-tertiary);
  border-bottom: 2px solid transparent;
  transition: all var(--dur-fast) var(--ease-out);
  cursor: pointer;
}
.tab-bar__item--active {
  color: var(--brand-green);
  border-bottom-color: var(--brand-green);
  font-weight: var(--fw-medium);
}

/* ===== 弹窗 ===== */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out);
}
.modal-overlay--show { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  width: calc(100% - 32px);
  max-width: 360px;
  box-shadow: var(--shadow-xl);
  transform: translateY(20px);
  transition: transform var(--dur-base) var(--ease-out);
}
.modal-overlay--show .modal { transform: translateY(0); }

/* ===== 抽屉 ===== */
.drawer-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.3);
  z-index: 999;
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out);
}
.drawer-overlay--show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 100%; max-width: 400px;
  background: var(--bg-card);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform var(--dur-base) var(--ease-out);
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}
.drawer--show { transform: translateX(0); }