/* 自定义样式补丁（Tailwind CDN 之外） */
:root {
  --brand: #6366f1;
  --brand-light: #818cf8;
}
* { -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #f8fafc;
  color: #0f172a;
  -webkit-font-smoothing: antialiased;
}

/* 隐藏滚动条但保留滚动 */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* 底部 tab bar */
.tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid #e2e8f0;
  z-index: 50;
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 6px 4px; font-size: 11px; color: #64748b;
}
.tabbar a.active { color: var(--brand); font-weight: 600; }
.tabbar a .icon { font-size: 20px; line-height: 1; }

/* 桌面端：tab bar 变左侧栏 */
@media (min-width: 768px) {
  .tabbar {
    top: 0; bottom: 0; left: 0; right: auto;
    width: 80px; flex-direction: column;
    border-top: none; border-right: 1px solid #e2e8f0;
  }
  .tabbar a { font-size: 12px; padding: 12px 4px; }
  .tabbar a .icon { font-size: 24px; }
  .main-wrap { margin-left: 80px; }
}

/* 任务卡片 */
.task-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  transition: all 0.15s;
}
.task-card:active { transform: scale(0.98); }
.task-card.done { opacity: 0.55; }
.task-card.done .task-title { text-decoration: line-through; }
.task-card.doing { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(99,102,241,0.18); }
.task-card.dragging { opacity: 0.4; }

/* 复选框圆形 */
.checkbox {
  width: 22px; height: 22px;
  border: 2px solid #cbd5e1; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}
.checkbox.checked { background: var(--brand); border-color: var(--brand); color: #fff; }

/* tag chip */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 500;
}

/* 进度条 */
.progress {
  height: 6px; background: #e2e8f0; border-radius: 999px; overflow: hidden;
}
.progress > div { height: 100%; background: var(--brand); transition: width 0.3s; }

/* toast */
.toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  background: #1e293b; color: #fff; padding: 10px 16px;
  border-radius: 8px; font-size: 13px; z-index: 100;
  animation: toastIn 0.2s ease-out;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* 复盘区块 */
.review-section {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px; margin-bottom: 12px;
}
.review-section h4 { font-size: 13px; color: var(--brand); margin-bottom: 6px; font-weight: 600; }
.review-section p { font-size: 14px; line-height: 1.6; white-space: pre-wrap; color: #334155; }

/* 按钮 */
.btn-primary {
  background: var(--brand); color: #fff; padding: 8px 16px;
  border-radius: 8px; font-size: 14px; font-weight: 500; border: none; cursor: pointer;
}
.btn-primary:hover { background: #4f46e5; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost {
  background: transparent; color: var(--brand); padding: 8px 16px;
  border-radius: 8px; font-size: 14px; font-weight: 500; border: 1px solid var(--brand); cursor: pointer;
}
.btn-ghost:hover { background: rgba(99,102,241,0.08); }

input, textarea, select {
  font-family: inherit; font-size: 14px;
  border: 1px solid #cbd5e1; border-radius: 8px; padding: 8px 10px;
  outline: none; background: #fff; color: #0f172a; width: 100%;
}
input:focus, textarea:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
textarea { resize: vertical; min-height: 80px; }

/* 移动端友好：单手操作 */
@media (max-width: 640px) {
  .mobile-bottom-pad { padding-bottom: 80px; }
}
