/* =========================================================
   Day Day Up · 视觉设计规范 (Design System)
   配色 / 间距 / 圆角 / 阴影 / 层级 —— 统一体系
   ========================================================= */

/* ---------- 1. 设计令牌 Design Tokens ---------- */
:root {
  /* 表面 Surfaces */
  --bg: #EEF1F6;
  --surface: #FFFFFF;
  --surface-2: #F6F8FB;
  --surface-3: #EFF2F7;

  /* 文字 Text */
  --text: #1E2530;
  --text-secondary: #5C6675;
  --text-muted: #98A2B1;

  /* 描边 Lines */
  --border: #E7EBF1;
  --border-strong: #D8DEE8;

  /* 主色 Primary（由 JS 注入 --primary / --primary-rgb / --primary-dark） */
  --primary: #4C6EF5;
  --primary-rgb: 76, 110, 245;
  --primary-dark: #3B5BDB;
  --primary-soft: rgba(76, 110, 245, 0.10);
  --primary-softer: rgba(76, 110, 245, 0.06);

  /* 状态色 Status */
  --danger: #F03E3E;
  --danger-soft: rgba(240, 62, 62, 0.10);
  --success: #0CA678;
  --success-soft: rgba(12, 166, 120, 0.12);
  --warning: #F59F00;
  --warning-soft: rgba(245, 159, 0, 0.12);

  /* 圆角 Radius */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-pill: 999px;

  /* 阴影 Shadow（柔和、分层） */
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.05), 0 1px 2px rgba(16, 24, 40, 0.03);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, 0.07), 0 2px 6px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 20px 52px rgba(16, 24, 40, 0.16);

  /* 间距 Spacing（4 的倍数节奏） */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-7: 28px; --sp-8: 32px;

  /* 布局 Layout */
  --sidebar-width: 248px;
  --sidebar-width-mobile: 76px;
  --content-max: 940px;
  --header-h: 64px;

  /* 字体 Type */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  font-size: 15px;
  color-scheme: light;
}

/* ---------- 2. 基础 Base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

::selection { background: var(--primary-soft); }

button, input, textarea, select { font-family: inherit; }

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-soft);
  border-radius: var(--r-xs);
}

/* ---------- 3. 布局 Layout ---------- */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  background: var(--bg);
}

/* ---------- 4. 侧边栏 Sidebar ---------- */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  z-index: 10;
}

.sidebar-header {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(155deg, var(--primary-soft), rgba(var(--primary-rgb), 0.015));
}

.sidebar-header h1 {
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  background: linear-gradient(120deg, var(--primary), var(--primary-dark));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--primary);
}

.sidebar-header .subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
  letter-spacing: 0.5px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* 导航项 */
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.92rem;
  border-radius: var(--r-sm);
  position: relative;
  transition: background 0.18s ease, color 0.18s ease;
  user-select: none;
}

.nav-item:hover { background: var(--surface-2); color: var(--text); }

.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  border-radius: 0 3px 3px 0;
  background: var(--primary);
}

.nav-item .nav-icon {
  font-size: 1.18rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
}

.nav-item .nav-text { flex: 1; }

.nav-item .nav-badge {
  margin-left: auto;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* 侧边栏底部 */
.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 8px 8px calc(12px + env(safe-area-inset-bottom));
}

.footer-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: background 0.18s ease, color 0.18s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  border-radius: var(--r-sm);
}

.footer-btn:hover { background: var(--surface-2); color: var(--text); }

.footer-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }

.theme-picker-wrap {
  padding: 12px 14px 8px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.theme-picker-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

/* ---------- 5. 主内容区 Main ---------- */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-7) var(--sp-8);
  height: 100vh;
  background: var(--bg);
  scroll-behavior: smooth;
}

.page {
  display: none;
  max-width: var(--content-max);
  margin: 0 auto;
  animation: pageIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.page.active { display: block; }

@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 页面标题 */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--border);
}

.page-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0.2px;
}

.page-header .page-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  background: var(--primary-soft);
  font-size: 1.15rem;
  line-height: 1;
}

/* ---------- 6. 卡片 Card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-6);
  margin-bottom: var(--sp-5);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.card-title {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: var(--sp-4);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-title::before {
  content: "";
  width: 3px;
  height: 15px;
  border-radius: 2px;
  background: var(--primary);
  margin-right: 10px;
  flex-shrink: 0;
}

.card-title > span,
.card-title > div { display: flex; align-items: center; }

/* ---------- 7. 复选框任务列表 ---------- */
.task-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--r-xs);
  transition: background 0.15s ease;
  position: relative;
}

.task-item:hover { background: var(--surface-2); }

.task-item label {
  flex: 1;
  cursor: pointer;
  font-size: 0.92rem;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.task-checkbox {
  width: 19px;
  height: 19px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.task-text { transition: color 0.2s ease; }

.task-text.completed { color: var(--text-muted); text-decoration: line-through; }

.task-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.task-item:hover .task-actions,
.task-item.editing .task-actions { opacity: 1; }

.task-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 9px;
  border-radius: var(--r-xs);
  font-size: 0.78rem;
  color: var(--text-secondary);
  transition: background 0.15s ease, color 0.15s ease;
}

.task-btn:hover { background: var(--surface-3); }
.task-btn.delete:hover { background: var(--danger-soft); color: var(--danger); }
.task-btn.edit:hover { background: var(--primary-soft); color: var(--primary); }

/* ---------- 8. 按钮 Button ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--r-xs);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.12s ease, box-shadow 0.2s ease, color 0.2s ease;
  white-space: nowrap;
  line-height: 1.2;
}

.btn:active { transform: translateY(1px) scale(0.985); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.28);
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.34);
  transform: translateY(-1px);
}

.btn-sm { padding: 7px 14px; font-size: 0.82rem; }

.btn-cancel {
  background: var(--surface-2);
  color: var(--text-secondary);
}
.btn-cancel:hover { background: var(--surface-3); color: var(--text); }

.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 2px 8px rgba(240, 62, 62, 0.26);
}
.btn-danger:hover { background: #D92C2C; box-shadow: 0 4px 14px rgba(240, 62, 62, 0.32); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

/* 添加按钮（虚线） */
.add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  color: var(--primary);
  background: var(--primary-softer);
  border: 1px dashed rgba(var(--primary-rgb), 0.45);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: var(--sp-3);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.add-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ---------- 9. 输入框 Input ---------- */
.input-field {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xs);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: var(--surface);
  color: var(--text);
}

.input-field::placeholder { color: var(--text-muted); }

.input-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

textarea.input-field {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

.mini-select {
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xs);
  font-size: 0.85rem;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}
.mini-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

/* ---------- 10. 体重 Weight ---------- */
.weight-input-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--sp-4);
}

.weight-input {
  width: 130px;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xs);
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  color: var(--text);
  background: var(--surface);
}
.weight-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

.weight-unit { color: var(--text-secondary); font-size: 0.9rem; }

.weight-display {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  padding: 10px 0;
}

.weight-history-link {
  color: var(--primary);
  cursor: pointer;
  font-size: 0.85rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}
.weight-history-link:hover { text-decoration: underline; }

.chart-container {
  width: 100%;
  height: 280px;
  position: relative;
  margin: var(--sp-4) 0;
}
.chart-container canvas { width: 100% !important; height: 100% !important; }

/* ---------- 11. 英语学习 English ---------- */
.word-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-xs);
  padding: 14px 16px;
  margin-bottom: var(--sp-3);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  flex-wrap: wrap;
}

/* 窄屏时按钮换行 */
@media (max-width: 480px) {
  .word-card { gap: 8px; padding: 12px; }
  .word-card .speak-btn { width: 34px; height: 34px; font-size: 0.9rem; }
}
.word-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-color: var(--border-strong);
}

.word-card .word-main { flex: 1; min-width: 0; }

.word-card .word {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text);
}
.word-card .word.completed { color: var(--text-muted); text-decoration: line-through; }

.word-card .phonetic { font-size: 0.8rem; color: var(--text-secondary); margin-left: 8px; }
.word-card .meaning { font-size: 0.85rem; color: var(--primary); margin-top: 3px; font-weight: 500; }
.word-card .example { font-size: 0.8rem; color: var(--text-secondary); margin-top: 5px; font-style: italic; line-height: 1.55; }

.speak-btn {
  background: var(--surface-2);
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  color: var(--primary);
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
  flex-shrink: 0;
}
.speak-btn:hover { background: var(--primary); color: #fff; transform: scale(1.06); }
.speak-btn:active { transform: scale(0.96); }
.speak-btn.online-audio:hover { background: #0CA678; }
.speak-btn.copy-btn:hover { background: var(--text-secondary); color: #fff; }

.word-learned-check { margin-top: 2px; flex-shrink: 0; }

/* ---------- 12. 金宝日常 / 标签 Tags ---------- */
.tag-selector { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: var(--sp-4); }

.tag-chip {
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--text-secondary);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  border: 1px solid transparent;
  user-select: none;
}
.tag-chip:hover { border-color: rgba(var(--primary-rgb), 0.4); color: var(--primary); }
.tag-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.jinbao-entry {
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--border);
}
.jinbao-entry:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.jinbao-date { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 6px; }

.jinbao-tags { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.jinbao-tag {
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 500;
}

.jinbao-content {
  font-size: 0.88rem;
  line-height: 1.65;
  white-space: pre-wrap;
  color: var(--text);
}

/* ---------- 13. 备忘录 Memo ---------- */
.memo-display {
  font-size: 0.9rem;
  line-height: 1.7;
  white-space: pre-wrap;
  color: var(--text);
  min-height: 60px;
}
.memo-empty { color: var(--text-muted); font-style: italic; }

/* ---------- 14. 每日计划聚合 Daily Plan ---------- */
.plan-section { margin-bottom: var(--sp-4); }

.plan-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: var(--sp-2);
  display: flex;
  align-items: center;
  gap: 8px;
}

.count-badge {
  font-size: 0.72rem;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 2px 9px;
  border-radius: var(--r-pill);
  font-weight: 700;
}

.plan-link {
  color: var(--primary);
  cursor: pointer;
  font-size: 0.8rem;
  margin-left: auto;
  font-weight: 500;
}
.plan-link:hover { text-decoration: underline; }

/* ---------- 15. 历史记录 History ---------- */
.history-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: var(--sp-5);
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
  flex-wrap: wrap;
}

.history-date-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }

.history-date-item {
  padding: 12px 16px;
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: background 0.15s ease;
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.history-date-item:hover { background: var(--surface-2); }

.history-date-item .day-summary { color: var(--text-secondary); font-size: 0.8rem; text-align: right; }

.history-detail-section { margin-bottom: var(--sp-4); }
.history-detail-section h4 {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 700;
}

/* 通用数据表 */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface);
}
.data-table th {
  text-align: left;
  padding: 11px 14px;
  background: var(--surface-2);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.78rem;
}
.data-table td { padding: 11px 14px; border-top: 1px solid var(--border); }
.data-table tr:first-child td { border-top: none; }

/* ---------- 16. 弹窗 / 确认框 Modal ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.42);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: var(--sp-4);
}
.modal-overlay.show { display: flex; }

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-7);
  min-width: 320px;
  max-width: 460px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
.modal-box:is([style*="width:700px"], [style*="width: 700px"]) { max-width: 92vw; }

@keyframes modalIn {
  from { transform: scale(0.94) translateY(8px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-box h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-box p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: var(--sp-5);
  line-height: 1.6;
}

.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- 17. 编辑框 ---------- */
.edit-input-group { display: flex; gap: 8px; align-items: center; }
.edit-input-group input { flex: 1; }

/* ---------- 18. 主题色选择器 ---------- */
.theme-picker { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.theme-option {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--border-strong);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}
.theme-option:hover { transform: scale(1.12); }
.theme-option.active {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text);
}

/* ---------- 19. 统计角标 Stats Badge ---------- */
.stats-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  padding: 3px 10px;
  background: var(--surface-2);
  border-radius: var(--r-pill);
  font-weight: 600;
}
.stats-badge.good { background: var(--success-soft); color: var(--success); }
.stats-badge.ok   { background: var(--warning-soft); color: #B7791F; }
.stats-badge.low  { background: var(--danger-soft);  color: var(--danger); }

/* ---------- 20. 体重目标设置 ---------- */
.target-weight-setup { display: flex; gap: 8px; align-items: center; margin-top: var(--sp-2); flex-wrap: wrap; }
.target-weight-setup input {
  width: 90px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xs);
  font-size: 0.85rem;
  text-align: center;
  outline: none;
  color: var(--text);
  background: var(--surface);
}
.target-weight-setup input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

/* ---------- 21. 日程 Schedule ---------- */
.schedule-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--r-xs);
  transition: background 0.15s ease;
}
.schedule-item:hover { background: var(--surface-2); }
.schedule-item + .schedule-item { border-top: 1px solid var(--border); }

.schedule-time {
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 700;
  min-width: 60px;
  font-variant-numeric: tabular-nums;
}

.schedule-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: var(--sp-4); }
.schedule-form input[type="text"] { flex: 1; min-width: 160px; }
.schedule-form input[type="time"] { width: 120px; }

/* ---------- 22. 行内操作 / 提示 / 空状态 ---------- */
.row-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.row-actions.sm .task-btn { padding: 4px 8px; font-size: 0.75rem; }

.hint {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.muted-text { color: var(--text-muted); font-size: 0.85rem; }

.entry-empty {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 10px 2px;
  font-style: italic;
}

/* ---------- 23. 滚动条美化 ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--r-pill);
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ---------- 24. 空状态 Empty State ---------- */
.empty-state {
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 2.6rem; margin-bottom: 10px; }
.empty-state p { font-size: 0.85rem; }

/* ---------- 25. 响应式 Responsive ---------- */
@media (max-width: 860px) {
  :root { --sidebar-width: var(--sidebar-width-mobile); font-size: 14px; }

  .sidebar { overflow: visible; }

  .sidebar-header { padding: 16px 8px; text-align: center; }
  .sidebar-header h1,
  .sidebar-header .subtitle,
  .nav-item .nav-text,
  .footer-btn .btn-text,
  .theme-picker-label { display: none; }

  .nav-item {
    justify-content: center;
    padding: 13px 8px;
    border-radius: var(--r-sm);
  }
  .nav-item.active::before { display: none; }
  .nav-item.active { background: var(--primary-soft); }
  .nav-item .nav-icon { font-size: 1.35rem; }

  .nav-item .nav-badge { display: none; }

  .footer-btn { justify-content: center; padding: 13px 8px; }

  .theme-picker-wrap { padding: 10px 8px; }
  .theme-picker { justify-content: center; }

  .main-content { padding: var(--sp-5) var(--sp-4); }
  .page { max-width: 100%; }

  .card { padding: var(--sp-5); }
  .page-header h2 { font-size: 1.2rem; }
}

@media (max-width: 480px) {
  .sidebar { width: 64px; min-width: 64px; }
  .main-content { padding: var(--sp-4) var(--sp-3); }
  .card { padding: var(--sp-4); border-radius: var(--r-sm); }
}

/* 减少动效（无障碍） */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
