/* ========== 全局变量 ========== */
:root {
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --accent: #f97316;
  --bg: #f3f7f6;
  --card: #ffffff;
  --text: #1f2937;
  --text-light: #64748b;
  --border: #e2e8f0;
  --danger: #dc2626;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(15, 118, 110, 0.08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6; padding-bottom: 40px;
}
.topbar { background: var(--primary); color: #fff; }
.topbar-inner {
  max-width: 720px; margin: 0 auto; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.app-title { font-size: 18px; }
.nickname-box { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.container { max-width: 720px; margin: 0 auto; padding: 16px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px; }
.section-title { font-size: 16px; margin-bottom: 12px; }
.form-row { margin-bottom: 12px; }
.form-label { display: block; font-size: 14px; margin-bottom: 6px; color: var(--text-light); }
.form-control {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 10px; font-size: 15px; background: #fff; color: var(--text);
}
textarea.form-control { min-height: 80px; resize: vertical; }
.form-actions { display: flex; gap: 12px; margin-top: 8px; }
.btn { min-height: 44px; padding: 0 18px; border: none; border-radius: 10px; font-size: 15px; cursor: pointer; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:active { background: var(--primary-dark); }
.btn-secondary { background: #fff; color: var(--accent); border: 1px solid var(--accent); }
.btn-ghost {
  background: rgba(255,255,255,0.18); color: #fff; border: 1px solid rgba(255,255,255,0.4);
  min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 8px;
}
.ocr-status { margin-top: 10px; font-size: 14px; color: var(--text-light); }
.ocr-status.error { color: var(--danger); }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-btn {
  min-height: 36px; padding: 6px 14px; border: 1px solid var(--border);
  background: #fff; border-radius: 999px; font-size: 14px; cursor: pointer; color: var(--text);
}
.filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.task-list { display: flex; flex-direction: column; gap: 14px; }
.task-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.subject-tag { font-size: 13px; padding: 2px 10px; border-radius: 999px; }
.card-meta { font-size: 13px; color: var(--text-light); }
.card-content { font-size: 15px; margin-bottom: 10px; white-space: pre-wrap; }
.deadline { font-size: 13px; color: var(--text-light); margin-bottom: 10px; }
.deadline.overdue { color: var(--danger); font-weight: 600; }
.card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 10px;
}
.done-count { font-size: 14px; font-weight: 600; }
.done-by { font-size: 13px; color: var(--text-light); flex: 1; }
.check-row { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font-size: 15px; }
.check-row input { width: 20px; height: 20px; accent-color: var(--primary); }
.empty-tip {
  text-align: center; color: var(--text-light); padding: 40px 16px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
}
@media (min-width: 600px) { .app-title { font-size: 20px; } }
