/* ============================================================
   新流 — 极简禅意设计系统
   宣纸米白 · 水墨灰 · 朱砂红 · 靛蓝
   ============================================================ */

:root {
  --font: "PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
  --font-serif: "Noto Serif SC","Songti SC",serif;
  --radius: 10px;
  --radius-lg: 14px;

  --bg:            #f9f7f0;
  --bg-card:       #fefcf6;
  --bg-hover:      #f3efe3;
  --bg-active:     #ebe5d3;
  --bg-muted:      #f4f1e8;

  --text:          #3c3628;
  --text-secondary:#7a7260;
  --text-hint:     #a09880;

  --border:        #e5ded0;
  --border-light:  #ede8db;

  --accent:        #4a6fa5;
  --accent-light:  #e8eef6;
  --danger:        #c0392b;
  --danger-light:  #fdf0ed;
  --success:       #5b8c5a;
  --success-light: #edf6ed;
  --warning:       #c48b3a;
  --warning-light: #fdf6eb;

  --shadow: 0 2px 12px rgba(60,54,40,0.06);
  --shadow-lg: 0 8px 30px rgba(60,54,40,0.10);
}

/* ========== 全局 ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }
.main:not(.hidden) { display: block; }

/* ========== 认证页 ========== */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
  position: relative;
}
.auth-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 40px 36px 32px;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}
.auth-card h1 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 500;
  text-align: center;
  margin-bottom: 4px;
  color: var(--text-secondary);
  letter-spacing: 0.3em;
}
.auth-card .auth-subtitle {
  font-size: 13px;
  color: var(--text-hint);
  text-align: center;
  margin-bottom: 28px;
}
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
}
.auth-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid var(--border);
  transition: all 0.15s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font);
}
.auth-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.auth-tab:hover { color: var(--text); }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form label { font-size: 13px; color: var(--text-secondary); }
.auth-form input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.15s;
}
.auth-form input:focus { outline: none; border-color: var(--accent); background: var(--bg-card); }
.auth-msg { font-size: 13px; padding: 10px 14px; border-radius: var(--radius); margin-bottom: 4px; display: none; }
.auth-msg.success { display: block; background: var(--success-light); color: var(--success); }
.auth-msg.error { display: block; background: var(--danger-light); color: var(--danger); }
.auth-msg.info { display: block; background: var(--accent-light); color: var(--accent); }

/* 登录主按钮 */
.btn-login-main { width: 100%; padding: 11px; font-size: 15px; font-weight: 500; }

/* 密码行 — 全宽输入框 + 忘记密码右下方 */
.pwd-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}
.pwd-row input { width: 100%; }
.pwd-links {
  display: flex;
  justify-content: space-between;
  width: 100%;
}
.pwd-link {
  font-size: 12px;
  color: var(--text-hint);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}
.pwd-link:hover { color: var(--accent); }

/* 协议勾选框 */
.agree-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-hint);
  cursor: pointer;
  user-select: none;
}
.agree-check input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}
.agree-check span { line-height: 1; }
.agree-check .auth-terms-link { font-size: 12px; }

/* 底部操作栏 */
.auth-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.auth-bottom-link {
  font-size: 13px;
  color: var(--accent);
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}
.auth-bottom-link:hover { text-decoration: underline; }
.auth-bottom-link.highlight {
  color: var(--warning);
  font-weight: 600;
  font-size: 14px;
}
.auth-preview-hint {
  text-align: center;
  color: var(--accent);
  font-size: 16px;
  font-weight: 500;
  margin-top: 32px;
  opacity: 0.75;
  letter-spacing: 0.08em;
  cursor: default;
}

/* 旧样式隐藏 */
.login-method-toggle, .login-method-btn, .pwd-field, .auth-terms, .sms-phone-row, .sms-prefix { display: none !important; }
/* 协议链接仍然使用 */
.auth-terms-link {
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
}
.auth-terms-link:hover { text-decoration: underline; }

/* 旧手机号样式隐藏 */
.sms-phone-row, .sms-phone-row:focus-within, .sms-prefix, .sms-phone-row input, .sms-phone-row input:focus { display: none !important; }

/* ========== 导航栏 ========== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(249,247,240,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 52px;
  padding: 0 24px;
}
.nav-logo {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  margin-right: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.nav-logo-img {
  height: 46px;
  width: 46px;
  object-fit: contain;
  border-radius: 9px;
  display: block;
}
.nav-tabs {
  display: flex;
  gap: 4px;
  flex: 1;
}
.nav-tab {
  padding: 7px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius);
  transition: all 0.15s;
  white-space: nowrap;
  background: none;
  border: none;
  font-family: var(--font);
}
.nav-tab:hover { color: var(--text); background: var(--bg-hover); }
.nav-tab.active { color: var(--accent); background: var(--accent-light); }
.nav-user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  position: relative;
  padding: 4px 10px;
  border-radius: var(--radius);
}
.nav-user:hover { background: var(--bg-hover); }
.nav-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
}
.nav-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.nav-user-avatar svg {
  width: 100%;
  height: 100%;
}
.nav-user-name { font-size: 13px; color: var(--text); max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 天气小组件 */
.nav-weather {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  transition: background 0.15s;
  margin-right: 2px;
  user-select: none;
}
.nav-weather:hover { background: var(--bg-hover); color: var(--text); }
.nav-weather-icon { font-size: 16px; line-height: 1; }
.nav-weather-temp { font-weight: 500; color: var(--text); min-width: 32px; }
.nav-weather-city { font-size: 12px; color: var(--text-secondary); }
@media (max-width: 768px) {
  .nav-weather-city { display: none; }
  .nav-weather { padding: 4px 6px; gap: 2px; }
}

/* 天气弹窗 — 三日预报卡片 */
#weather-city-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.weather-day-card {
  flex: 1;
  min-width: 90px;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 14px 8px;
  text-align: center;
  box-shadow: var(--shadow);
}
.weather-day-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 2px; }
.weather-day-date { font-size: 11px; color: var(--text-hint); margin-bottom: 6px; }
.weather-day-icon { font-size: 28px; margin-bottom: 4px; }
.weather-day-desc { font-size: 12px; color: var(--text-secondary); margin-bottom: 2px; }
.weather-day-temp { font-size: 13px; font-weight: 500; color: var(--text); }
.weather-day-rain { font-size: 11px; color: var(--accent); margin-top: 2px; }

/* 用户下拉 */
.user-dropdown {
  position: absolute;
  top: 44px;
  right: 0;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  overflow: hidden;
  z-index: 200;
}
.user-dropdown-item {
  padding: 11px 16px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  font-family: var(--font);
}
.user-dropdown-item:hover { background: var(--bg-hover); }
.user-dropdown-item.danger { color: var(--danger); }
.user-dropdown-divider { height: 1px; background: var(--border-light); }
/* 浮层里的账号显示 */
.user-dropdown-account { padding: 11px 16px 10px; }
.user-dropdown-name { font-size: 13px; font-weight: 500; color: var(--text); }
.user-dropdown-email { font-size: 11.5px; color: var(--text-hint); margin-top: 3px; word-break: break-all; }

/* 头像浮层：两种展开方式，按设备分流。
   ① 指针设备（鼠标）：悬停展开，内容是「账号 + 退出登录」。点击头像本身已直接进个人中心，
      所以 DOM 里的「个人中心」那一项在指针设备下隐藏（见下方 media query），避免重复。
   ② 触摸设备：没有 hover，点击头像切换 .open 展开/收起，浮层里给出「个人中心 + 退出登录」两项
      —— 这是移动端进入个人中心和退出登录的唯一路径（个人中心页里已不再放退出按钮）。
   JS 侧用 matchMedia('(hover: hover) and (pointer: fine)') 决定点击走哪条路，见 app-supabase.js。 */
.user-dropdown { display: none; }
.nav-user.open .user-dropdown { display: block; }
@media (hover: hover) and (pointer: fine) {
  .nav-user:hover .user-dropdown { display: block; }
  /* 指针设备点头像即进个人中心，浮层里不再重复一项 */
  #btn-go-profile { display: none; }
  /* 桥接区：浮层距头像有 8px 空隙，鼠标经过时不中断 :hover，否则点不到退出按钮 */
  .nav-user:hover::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 12px; }
}

/* ========== 主内容 ========== */
.main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 24px 80px;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.page-header {
  margin-bottom: 28px;
}
.page-header h1 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
}
.page-header .subtitle {
  font-size: 14px;
  color: var(--text-hint);
  margin-top: 4px;
}

/* ========== 按钮系统 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  font-size: 14px;
  font-family: var(--font);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  transition: all 0.15s;
}
.btn:hover { opacity: 0.88; }
.btn:active { transform: scale(0.98); }
.btn-secondary { background: var(--bg-hover); color: var(--text); }
.btn-secondary:hover { background: var(--bg-active); }
.btn-danger { background: var(--danger); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-ghost { background: transparent; color: var(--text-secondary); padding: 5px 8px; }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); }

/* ========== 卡片通用 ========== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s;
}
.card:hover { box-shadow: var(--shadow-lg); }

/* ========== 目标页 ========== */
.goal-section {
  margin-bottom: 32px;
}
.goal-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.goal-section-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.goal-section-title span { color: var(--text-hint); font-weight: 400; margin-left: 6px; }

/* 目标页视图切换 tab */
.goal-view-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.goal-view-tab {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.goal-view-tab:hover { border-color: var(--accent); color: var(--accent); }
.goal-view-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.goal-list { display: flex; flex-direction: column; gap: 8px; }

.goal-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all 0.15s;
  cursor: pointer;
}
.goal-card:hover { box-shadow: var(--shadow-lg); }
.goal-card-main {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
}
.goal-card-priority {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.goal-card-priority.high { background: var(--danger); }
.goal-card-priority.mid { background: var(--warning); }
.goal-card-priority.low { background: var(--accent); }
.goal-card-content {
  flex: 1;
  min-width: 0;
}
.goal-card-text {
  font-size: 15px;
  color: var(--text);
  line-height: 1.4;
}
.goal-card-meta {
  display: flex;
  gap: 12px;
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-hint);
}
.goal-card-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.goal-progress-bar {
  width: 72px;
  height: 4px;
  background: var(--border-light);
  border-radius: 2px;
  overflow: hidden;
}
.goal-progress-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  transition: width 0.3s;
}
.goal-progress-num {
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 32px;
  text-align: right;
}
.goal-card-actions {
  display: flex;
  gap: 4px;
}

/* 目标展开区 */
.goal-expand {
  padding: 0 18px 16px;
  border-top: 1px solid var(--border-light);
  margin-top: 0;
}
.goal-expand-section {
  margin-top: 12px;
}
.goal-expand-label {
  font-size: 12px;
  color: var(--text-hint);
  margin-bottom: 6px;
}
.goal-expand-empty {
  font-size: 12px;
  color: var(--text-hint);
  font-style: italic;
}
.goal-expand-task {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 13px;
  color: var(--text-secondary);
}
.goal-expand-content-item {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 3px 0;
}

/* 归档区 */
.archived-section { margin-top: 16px; }
.archived-toggle {
  font-size: 13px;
  color: var(--text-hint);
  cursor: pointer;
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  font-family: var(--font);
}
.archived-toggle:hover { color: var(--text-secondary); }
.goal-card.archived { opacity: 0.65; }
.goal-card.archived:hover { opacity: 0.9; }

/* ========== 日排表页 ========== */
.daily-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 状态面板 */
.status-panel {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
}
.status-streak {
  font-size: 28px;
  font-weight: 500;
  color: var(--accent);
  min-width: 50px;
  text-align: center;
  line-height: 1;
}
.status-text { flex: 1; }
.status-msg {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}
.status-why {
  font-size: 13px;
  color: var(--text-hint);
  margin-top: 3px;
}

/* 日排表提示语 */
.daily-mantra {
  background: linear-gradient(135deg, var(--bg-card), var(--accent-light));
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 2px;
  text-align: center;
}
.status-energy {
  font-size: 12px;
  color: var(--text-hint);
  margin-top: 1px;
}

/* 日期切换 */
.daily-datebar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 4px;
}
.daily-date-nav {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-secondary);
  transition: all 0.15s;
}
.daily-date-nav:hover { background: var(--bg-hover); color: var(--text); }
.daily-date-text {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  min-width: 120px;
  text-align: center;
  cursor: pointer;
  transition: color 0.15s;
}
.daily-date-text:hover { color: var(--accent); }
/* 当前查看的这天被标记为高亮 */
.daily-date-text.is-hl { color: var(--warning); }
.daily-date-text.is-hl::after { content: " ★"; font-size: 14px; }

/* ========== 月历（日期跳转 + 高亮标记） ========== */
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.cal-title { font-family: var(--font-serif); font-size: 16px; font-weight: 500; }
.cal-nav {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 16px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.cal-nav:hover { background: var(--bg-hover); color: var(--text); }

.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-weekdays { margin-bottom: 6px; }
.cal-weekdays span { text-align: center; font-size: 11px; color: var(--text-hint); padding: 4px 0; }
.cal-grid { gap: 2px; }

.cal-cell {
  position: relative;
  height: 40px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s;
}
.cal-cell.cal-empty { cursor: default; }
.cal-cell:not(.cal-empty):hover { background: var(--bg-hover); }
.cal-num { pointer-events: none; }

/* 今天：靛蓝描边 */
.cal-cell.is-today { border-color: var(--accent); color: var(--accent); font-weight: 600; }
/* 当前正在查看的那天：浅靛蓝底 */
.cal-cell.is-selected { background: var(--accent-light); }
/* 已标记高亮的日子：赭石底 + 描边 */
.cal-cell.is-hl {
  background: var(--warning-light);
  border-color: var(--warning);
  color: var(--warning);
  font-weight: 600;
}
.cal-cell.is-hl.is-selected { box-shadow: inset 0 0 0 1px var(--warning); }

/* 有记录的小点 */
.cal-dot {
  position: absolute; bottom: 4px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.45;
}
.cal-cell.is-hl .cal-dot { background: var(--warning); opacity: 0.75; }

/* 每格右上角的 ★ 标记开关（常驻淡显，否则手机上没有 hover 找不到入口） */
.cal-star {
  position: absolute; top: -1px; right: -1px;
  width: 20px; height: 20px;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 9px; line-height: 1;
  color: var(--text-hint);
  cursor: pointer;
  opacity: 0.16;
  transition: opacity 0.15s, color 0.15s;
}
.cal-cell:hover .cal-star { opacity: 0.5; }
.cal-star:hover { opacity: 1 !important; color: var(--warning); }
.cal-star.on { opacity: 1; color: var(--warning); font-size: 11px; }

.cal-legend {
  display: flex; gap: 14px; justify-content: center;
  margin-top: 14px;
  font-size: 11px; color: var(--text-hint);
}
.cal-legend span { display: inline-flex; align-items: center; gap: 4px; }
.cal-legend i { font-style: normal; display: inline-block; }
.cal-legend .cal-swatch {
  width: 10px; height: 10px;
  border-radius: 3px;
  background: var(--accent-light);
  border: 1px solid var(--accent);
}
.cal-legend .cal-dot { position: static; transform: none; }
.cal-legend .cal-star-demo { font-size: 12px; color: var(--warning); line-height: 1; }
.cal-hint {
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-hint);
  text-align: center;
  line-height: 1.6;
}

/* 精力选择器 */
.energy-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
  padding: 4px 0;
}
.energy-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  font-size: 22px;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.energy-btn:hover { background: var(--bg-hover); }
.energy-btn.active { background: var(--accent-light); border-color: var(--accent); }
.energy-label {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 4px;
}

/* 时辰网格 */
.shichen-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.shichen-cell {
  padding: 10px 6px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  font-size: 12px;
}
.shichen-cell:hover { background: var(--bg-hover); }
.shichen-cell.active { background: var(--accent-light); border-color: var(--accent); color: var(--accent); }
.shichen-cell .shichen-emoji { font-size: 16px; display: block; margin-bottom: 2px; }
.shichen-cell .shichen-name { color: var(--text-secondary); }
.shichen-cell .shichen-time { color: var(--text-hint); font-size: 10px; }

/* 任务列表 */
.task-list { display: flex; flex-direction: column; gap: 6px; }
.task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
/* 任务附属控件容器：桌面端不产生盒子，子元素直接作为 .task-item 的 flex 子项参与布局（保持原样）；
   窄屏媒体查询里改为 flex 容器，整体换到第二行 */
.task-meta { display: contents; }
.task-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
  accent-color: var(--accent);
}
.task-text {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  outline: none;
}
.task-text:focus { color: var(--text); }
.task-done .task-text { text-decoration: line-through; color: var(--text-hint); }
/* 任务标签 + 计时 */
.task-tag {
  font-size: 11px;
  color: #8a6d1d;
  background: #f3ece0;
  border-radius: 20px;
  padding: 3px 10px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s;
}
.task-tag:hover { background: #e8ddc5; }
.task-timer {
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  color: var(--text-secondary);
  transition: transform 0.15s;
}
.task-timer:hover { transform: scale(1.2); color: var(--accent); }
.tag-picker-list { display: flex; flex-direction: column; gap: 4px; }
.tag-picker-item {
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  transition: background 0.15s;
}
.tag-picker-item:hover { background: var(--bg-hover); }
.tag-picker-item.selected { background: var(--bg-active); color: #8a6d1d; font-weight: 600; }
.task-goal { font-size: 11px; color: var(--accent); white-space: nowrap; cursor: pointer; padding: 1px 5px; border: 1px dashed var(--accent); border-radius: 8px; }
.task-goal:hover { background: var(--bg-hover); }
.task-goal.has-goal { border-style: solid; background: rgba(139,109,29,0.08); }
/* 任务计划徽标（重复/跨天/提醒时间）与设置入口 */
.task-sched { font-size: 12px; cursor: pointer; padding: 1px 4px; border-radius: 6px; white-space: nowrap; }
.task-sched:hover { background: var(--bg-hover); }
.task-sched-badge { font-size: 11px; color: var(--text-hint); white-space: nowrap; cursor: pointer; padding: 1px 6px; border: 1px dashed var(--bg-active); border-radius: 8px; }
.task-sched-badge:hover { background: var(--bg-hover); }
.task-sched-badge.overdue { color: #e5484d; border-color: #e5484d; font-weight: 600; }
/* ---- 内容页：创作记录 / 文档中心 切换 ---- */
.content-switch { display: flex; gap: 8px; margin-bottom: 18px; }
.content-switch-btn { padding: 8px 20px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--text-hint); font-size: 14px; cursor: pointer; transition: all .15s; }
.content-switch-btn:hover { color: var(--text); }
.content-switch-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---- 文档中心（页面级，2026-10-21 重构） ---- */
.nav-docs:hover { background: var(--bg-hover); }
.docs-src-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.docs-src-tab { padding: 9px 16px; background: none; border: none; border-bottom: 2px solid transparent; color: var(--text-hint); font-size: 14px; cursor: pointer; margin-bottom: -1px; }
.docs-src-tab:hover { color: var(--text); }
.docs-src-tab.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.docs-page-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.docs-crumb { font-size: 12px; color: var(--text-hint); flex-shrink: 0; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docs-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.docs-inline-input { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; background: transparent; color: var(--text); min-width: 180px; }
.docs-body { text-align: left; }
.docs-row { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; cursor: pointer; background: var(--bg-card); transition: background .12s; }
.docs-row:hover { background: var(--bg-hover); }
.docs-row.static { cursor: default; }
.docs-row.static:hover { background: var(--bg-card); }
.docs-row-main { flex: 1; min-width: 0; }
.docs-row-title { font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docs-row-preview { font-size: 12px; color: var(--text-hint); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docs-row-meta { font-size: 11px; color: var(--text-hint); margin-top: 3px; }
.docs-row-actions { display: flex; gap: 6px; flex-shrink: 0; }
.docs-pill { font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent); cursor: pointer; white-space: nowrap; }
.docs-pill:hover { background: var(--accent-light); }
.docs-pill.danger { border-color: #c0564f; color: #c0564f; }
.docs-pill.danger:hover { background: rgba(192,86,79,0.08); }
.docs-hintbox { border: 1px dashed var(--border); border-radius: var(--radius); padding: 18px; font-size: 13px; color: var(--text-secondary); line-height: 1.8; background: var(--bg-muted); }
.docs-hintbox code { background: var(--bg-active); padding: 1px 6px; border-radius: 4px; font-size: 12px; }
.docs-loading { padding: 24px; text-align: center; color: var(--text-hint); font-size: 13px; }
.docs-viewer { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); overflow: hidden; }
.docs-viewer-title { padding: 12px 16px; font-size: 15px; font-weight: 600; border-bottom: 1px solid var(--border-light); }
.docs-viewer pre { margin: 0; padding: 16px; font-size: 13px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; max-height: 60vh; overflow: auto; font-family: var(--font); }
.docs-editor { display: flex; flex-direction: column; gap: 10px; }
.docs-editor input { padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 16px; font-weight: 600; background: var(--bg-card); color: var(--text); }
.docs-editor textarea { padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; line-height: 1.8; background: var(--bg-card); color: var(--text); min-height: 46vh; resize: vertical; font-family: var(--font); }
.docs-editor input:focus, .docs-editor textarea:focus, .docs-inline-input:focus, .docs-form input:focus, .docs-form textarea:focus { outline: none; border-color: var(--accent); }
.docs-saved { font-size: 12px; color: var(--text-hint); }
.docs-form { display: flex; gap: 8px; align-items: center; }
.docs-form input { flex: 1; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; background: transparent; color: var(--text); }
.docs-form.vertical { flex-direction: column; align-items: stretch; gap: 10px; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; background: var(--bg-card); }
.docs-form.vertical textarea { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; line-height: 1.7; background: transparent; color: var(--text); resize: vertical; font-family: var(--font); }
.docs-form-label { font-size: 13px; color: var(--text-secondary); }
.docs-form-actions { display: flex; gap: 8px; }

/* 任务计划设置弹窗 */
.sched-form { text-align: left; font-size: 14px; }
.sched-row { display: flex; align-items: center; gap: 8px; padding: 6px 2px; cursor: pointer; }
.sched-weekdays { display: flex; gap: 6px; padding: 4px 2px 8px 26px; flex-wrap: wrap; }
.sched-wd { display: flex; align-items: center; gap: 3px; font-size: 13px; cursor: pointer; padding: 3px 7px; border: 1px solid var(--bg-active); border-radius: 8px; }
.sched-wd:has(input:checked) { border-color: var(--accent); color: var(--accent); }
.sched-sub { padding: 4px 2px 8px 26px; font-size: 13px; color: var(--text-hint); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.task-time { font-size: 11px; color: var(--text-hint); white-space: nowrap; cursor: pointer; padding: 1px 4px; border-radius: 6px; }
.task-time:hover { background: var(--bg-hover); color: var(--text); }
/* 目标层级：子目标缩进卡片 */
.goal-child { margin-top: 6px !important; border-left: 3px solid var(--bg-active); }
.task-delete {
  font-size: 16px;
  cursor: pointer;
  color: var(--text-hint);
  padding: 2px 6px;
  border-radius: 4px;
  background: none;
  border: none;
  font-family: var(--font);
}
.task-delete:hover { color: var(--danger); background: var(--danger-light); }
/* 任务放入待定池按钮 */
.task-shelve {
  font-size: 14px;
  cursor: pointer;
  color: var(--text-hint);
  padding: 2px 5px;
  border-radius: 4px;
  white-space: nowrap;
  user-select: none;
}
.task-shelve:hover { color: #d9a514; background: var(--bg-hover); }
/* 任务待定池区块（日排表页） */
.shelved-tasks { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); }
.shelved-header { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.shelved-header:hover { color: var(--text); }
.shelved-count { font-size: 11px; background: var(--bg-active); color: var(--text-hint); border-radius: 999px; padding: 1px 8px; }
.shelved-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); margin-bottom: 8px;
}
.shelved-main { flex: 1; min-width: 0; }
.shelved-text { font-size: 14px; color: var(--text); }
.shelved-in { display: inline-block; font-size: 11px; color: var(--text-hint); margin-right: 8px; margin-top: 2px; }
.shelved-hist { display: inline-block; font-size: 11px; color: #d9a514; background: var(--bg-active); border-radius: 6px; padding: 1px 6px; margin-right: 6px; margin-top: 2px; }
.shelved-ops { flex-shrink: 0; display: flex; gap: 6px; }

/* 卡片底部次级入口（日排表「今日任务」卡最下方的「查看历史记录」）
   单独一行 + 上分隔线 + 右对齐；上下 padding 12px 让触摸目标接近移动端 44px 基准 */
.card-foot-link {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  text-align: right;
}
.card-foot-btn {
  display: inline-block;
  padding: 12px 0;
  border: none;
  background: none;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.15s;
}
.card-foot-btn:hover { color: var(--accent); }

/* 日排表反思/笔记 */
.daily-textarea {
  width: 100%;
  min-height: 70px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-card);
  resize: vertical;
  transition: border-color 0.15s;
}
.daily-textarea:focus { outline: none; border-color: var(--accent); }
.daily-textarea::placeholder { color: var(--text-hint); }

/* 监控检查 */
.monitoring-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.monitoring-card-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.checklist-items { display: flex; flex-direction: column; gap: 6px; }
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
}
.checklist-item input[type="checkbox"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.checklist-label {
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  line-height: 1.5;
}
.checklist-desc {
  font-size: 12px;
  color: var(--text-hint);
  margin-top: 1px;
}

/* ========== 内容页 ========== */
.content-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: center;
}
.content-filters select {
  padding: 8px 32px 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-card);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%237a7260' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.content-filters select:focus { outline: none; border-color: var(--accent); }
/* 关键词搜索 */
.content-filters #content-search {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-card);
  transition: border-color 0.15s;
}
.content-filters #content-search:focus { outline: none; border-color: var(--accent); }

.content-grid { display: flex; flex-direction: column; gap: 10px; }

.content-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  transition: all 0.15s;
  cursor: pointer;
}
.content-card:hover { box-shadow: var(--shadow-lg); }
.content-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.content-card-title { font-size: 15px; font-weight: 500; color: var(--text); }
.content-card-status {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 10px;
  font-weight: 500;
}
.content-card-status.planning { background: var(--accent-light); color: var(--accent); }
.content-card-status.drafting { background: var(--warning-light); color: var(--warning); }
.content-card-status.producing { background: var(--danger-light); color: var(--danger); }
.content-card-status.published { background: var(--success-light); color: var(--success); }
.content-card-meta {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--text-hint);
  flex-wrap: wrap;
}
.content-card-goal {
  font-size: 12px;
  color: var(--accent);
  margin-top: 4px;
}
.content-card-body-preview {
  font-size: 12px;
  color: var(--text-hint);
  margin-top: 4px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 置顶按钮 */
.pin-btn {
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: 0.3;
  transition: all 0.15s;
  line-height: 1;
  margin-left: 4px;
}
.pin-btn:hover, .pin-btn.active { opacity: 1; background: var(--accent-light); }
.content-card.pinned { border-left: 3px solid var(--accent); }

/* ========== 待定池 ========== */
#pending-priority {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  margin-bottom: 8px;
}
.pending-rules {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}
.pending-list { display: flex; flex-direction: column; gap: 8px; }
.pending-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.15s;
}
.pending-card:hover { box-shadow: var(--shadow-lg); }
.pending-content { flex: 1; font-size: 14px; color: var(--text); }
.pending-priority {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.pending-priority.high { background: var(--danger-light); color: var(--danger); }
.pending-priority.mid { background: var(--warning-light); color: var(--warning); }
.pending-priority.low { background: var(--accent-light); color: var(--accent); }

.pending-stats {
  font-size: 13px;
  color: var(--text-hint);
  margin-bottom: 16px;
}

/* ========== 进度页 ========== */
.progress-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.progress-card { background: var(--bg-card); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 20px; }
.progress-card h3 { font-size: 14px; font-weight: 500; margin-bottom: 14px; color: var(--text-secondary); }

/* 时辰统计 */
.shichen-chart { display: flex; flex-direction: column; gap: 8px; }
.shichen-chart-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.shichen-chart-label {
  font-size: 12px;
  color: var(--text-secondary);
  width: 40px;
  text-align: right;
}
.shichen-chart-bar-wrap {
  flex: 1;
  height: 20px;
  background: var(--bg-hover);
  border-radius: 4px;
  overflow: hidden;
}
.shichen-chart-bar {
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
  transition: width 0.5s;
}
.shichen-chart-num {
  font-size: 12px;
  color: var(--text-hint);
  min-width: 24px;
}

/* 目标进度 */
.goal-progress-list { display: flex; flex-direction: column; gap: 10px; }
.goal-progress-item { display: flex; align-items: center; gap: 10px; }
.goal-progress-name { font-size: 13px; color: var(--text); width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goal-progress-bar-wrap { flex: 1; height: 5px; background: var(--bg-hover); border-radius: 3px; overflow: hidden; }
.goal-progress-bar-fill { height: 100%; border-radius: 3px; background: var(--accent); transition: width 0.5s; }
.goal-progress-pct { font-size: 12px; color: var(--text-hint); min-width: 30px; text-align: right; }

/* 标签统计 */
.label-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.label-stat-card {
  background: var(--bg-hover);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
}
.label-stat-num { font-size: 22px; font-weight: 500; color: var(--accent); }
.label-stat-name { font-size: 12px; color: var(--text-hint); margin-top: 2px; }

/* 精力趋势 */
.energy-chart { display: flex; align-items: flex-end; gap: 4px; height: 100px; }
.energy-chart-bar {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
  min-height: 2px;
  transition: height 0.5s;
}

/* ========== 记录页 ========== */
.log-timeline { display: flex; flex-direction: column; gap: 4px; }
.log-entry {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.log-entry:last-child { border-bottom: none; }
.log-date {
  font-size: 13px;
  color: var(--text-hint);
  min-width: 90px;
  white-space: nowrap;
}
.log-summary {
  font-size: 14px;
  color: var(--text);
  flex: 1;
}

/* ========== 弹窗系统 ========== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(60,54,40,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.15s ease;
}
.modal-inner {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  max-width: 480px;
  width: calc(100% - 32px);
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-inner h3 {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 18px;
}
.modal-inner label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  margin-top: 12px;
}
.modal-inner label:first-of-type { margin-top: 0; }
.modal-inner input[type="text"],
.modal-inner textarea,
.modal-inner select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.15s;
  margin-bottom: 4px;
}
.modal-inner textarea { min-height: 80px; resize: vertical; }
.modal-inner input:focus,
.modal-inner textarea:focus,
.modal-inner select:focus { outline: none; border-color: var(--accent); background: var(--bg-card); }
.modal-inner select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%237a7260' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
  position: relative;
  z-index: 2;
  cursor: pointer;
}
.modal-inner input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

/* 平台多选组件 */
.platform-multi-select { position: relative; }
.platform-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  cursor: pointer;
  min-height: 42px;
  transition: border-color 0.15s;
  margin-bottom: 4px;
}
.platform-trigger:hover { border-color: var(--accent); }
.platform-trigger-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.platform-arrow { font-size: 12px; color: var(--text-hint); margin-left: 8px; }
.platform-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  max-height: 260px;
  overflow-y: auto;
  padding: 8px 0;
}
.platform-option { padding: 4px 14px; display: flex; align-items: center; justify-content: space-between; }
.platform-option label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-size: 13px !important;
  color: var(--text) !important;
  cursor: pointer;
  padding: 4px 0;
  margin: 0 !important;
  flex: 1;
}
.platform-option input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
.platform-del { cursor: pointer; opacity: 0.4; font-size: 16px; padding: 2px 6px; border-radius: 4px; }
.platform-del:hover { opacity: 1; background: var(--bg); color: var(--danger); }
.platform-custom-row { padding: 8px 14px; border-top: 1px solid var(--border-light); margin-top: 4px; }

/* 富文本编辑器 */
.richtext-toolbar {
  display: flex;
  gap: 2px;
  padding: 6px 8px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  flex-wrap: wrap;
}
.richtext-btn {
  width: 30px;
  height: 28px;
  border: none;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  font-family: var(--font);
}
.richtext-btn:hover { background: var(--bg-hover); color: var(--text); }
.richtext-btn:active { background: var(--bg-active); }
.richtext-sep { width: 1px; background: var(--border); margin: 2px 4px; }
.richtext-editor {
  min-height: 160px;
  max-height: 400px;
  overflow-y: auto;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  transition: border-color 0.15s;
  margin-bottom: 4px;
}
.richtext-editor:focus { outline: none; border-color: var(--accent); background: var(--bg-card); }
.richtext-editor:empty::before {
  content: attr(placeholder);
  color: var(--text-hint);
}
.richtext-editor h2 { font-size: 18px; margin: 12px 0 6px; }
.richtext-editor h3 { font-size: 16px; margin: 10px 0 4px; }
.richtext-editor ul, .richtext-editor ol { padding-left: 20px; margin: 4px 0; }
.richtext-editor blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  color: var(--text-secondary);
  margin: 8px 0;
}
.richtext-editor a { color: var(--accent); }
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: flex-end;
}
#progress-val { font-size: 13px; color: var(--text-secondary); }

/* 分类树弹窗 */
.cat-tree { margin-bottom: 16px; }
.cat-tree-node {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
}
.cat-tree-node:hover { background: var(--bg-hover); }
.cat-tree-name { flex: 1; color: var(--text); }
.cat-tree-delete { cursor: pointer; color: var(--text-hint); font-size: 14px; }
.cat-tree-delete:hover { color: var(--danger); }
.cat-add-row { display: flex; gap: 8px; margin-top: 12px; }
.cat-add-row input { flex: 1; }
.cat-add-row select { min-width: 110px; }

/* 监控编辑弹窗 */
.monitoring-edit-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius);
  margin-bottom: 10px;
  position: relative;
}
.monitoring-edit-item input { margin-bottom: 0 !important; }
.monitoring-edit-delete {
  position: absolute;
  top: 6px;
  right: 8px;
  cursor: pointer;
  color: var(--text-hint);
  font-size: 16px;
  background: none;
  border: none;
  font-family: var(--font);
}
.monitoring-edit-delete:hover { color: var(--danger); }

/* 头像 */
.avatar-section {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.avatar-preview-wrap {
  text-align: center;
  flex-shrink: 0;
}
.avatar-preview {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 600;
  overflow: hidden;
  border: 3px solid var(--bg);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-preview svg {
  width: 100%;
  height: 100%;
}
.avatar-preview-label {
  font-size: 11px;
  color: var(--text-hint);
  margin-top: 6px;
}
.avatar-section-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}
.avatar-options { flex: 1; min-width: 0; }
.cartoon-avatar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  max-width: 288px;
}
.cartoon-avatar-item {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  overflow: hidden;
  transition: all 0.15s;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cartoon-avatar-item:hover { border-color: var(--accent-light); transform: scale(1.08); }
.cartoon-avatar-item.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.cartoon-avatar-item svg { width: 100%; height: 100%; }
.avatar-file-name {
  font-size: 12px;
  color: var(--text-hint);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 清空数据弹窗 */
.clear-table-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.clear-table-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  transition: all 0.15s;
}
.clear-table-item:hover { background: var(--bg-hover); }
.clear-table-item:has(:checked) {
  background: var(--danger-light);
  border-color: #e8a0a0;
}
.clear-check { accent-color: var(--danger); width: 16px; height: 16px; }
.clear-table-all {
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  padding-bottom: 15px;
}

/* ========== 个人中心 ========== */
/* 桌面两列：左列「头像 / 云端备份 / 关于我们」，右列「账号设置 + 反馈 + 注销」。
   ⚠️ 两列必须是各自独立的 flex 列容器，不能靠给卡片指定 grid-column 来分列：
   grid 同一行的行高取该行较高者，左列的头像卡（约 300px）远高于右列的输入卡（约 110px），
   会把右列第二张卡顶到 300px 之下，列内出现大段空洞。实测过，别改回去。
   窄屏回到单列，见下方 @media (max-width: 899px)。 */
/* align-items 用 stretch 而不是 flex-start：stretch 让两列**容器**等高，
   再配合下方 @media (min-width: 900px) 里「末张卡 flex:1 吸收余量」，两列卡片的底边才能齐平。
   flex-start 会让每列按自身内容高度收缩，底边永远错开（实测左列比右列长 200px 左右）。 */
.profile-grid { display: flex; align-items: stretch; column-gap: 16px; }
.profile-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }

.profile-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-bottom: 14px;
}
.profile-card h3 { font-size: 15px; font-weight: 500; margin-bottom: 14px; }
.profile-card .row { display: flex; gap: 10px; align-items: flex-end; }
.profile-card .row input { flex: 1; }
.profile-card input {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.15s;
}
.profile-card input:focus { outline: none; border-color: var(--accent); }
.feedback-textarea {
  width: 100%;
  min-height: 90px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  resize: vertical;
  margin-bottom: 12px;
}
.feedback-textarea:focus { outline: none; border-color: var(--accent); }
.danger-card { border: 1px solid #f0d0d0; }

/* ========== 关于我们 ========== */
.about-list { display: flex; flex-direction: column; }
.about-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border-light);
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
}
.about-item:first-child { border-top: none; padding-top: 0; }
.about-item:last-child { padding-bottom: 0; }
.about-item:hover { text-decoration: none; }
.about-label { flex: 0 0 auto; color: var(--text-secondary); }
.about-value {
  min-width: 0;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.about-item:hover .about-value { text-decoration: underline; }
/* 账户卡里的「记录」入口用的是 button，复用 about-item 外观时补上按钮重置 */
button.about-item {
  border: none;
  background: none;
  width: 100%;
  cursor: pointer;
  font-family: var(--font);
  text-align: left;
  font-size: 14px;
}

/* ========== 云端备份 ========== */
.backup-hint { font-size: 12.5px; color: var(--text-secondary); margin: 0 0 12px; }
.backup-hint.hint-danger { color: var(--danger); margin: 8px 0 0; }
.backup-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.backup-sep { height: 1px; background: var(--border-light); margin: 13px 0; }
.backup-list { margin-top: 12px; }
.backup-empty { font-size: 12.5px; color: var(--text-hint); margin: 0; padding: 2px 0; }
.backup-item { border-top: 1px solid var(--border-light); padding: 9px 0; }
.backup-item:first-child { border-top: none; padding-top: 0; }
.backup-item-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.backup-item-label { font-size: 13.5px; color: var(--text); }
.backup-item-size { font-size: 12px; color: var(--text-hint); flex: 0 0 auto; }
.backup-item-meta { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }
.backup-item-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
/* 删除是破坏性操作，推到行尾，别和「恢复」挨着 */
.backup-item-actions .btn-ghost { margin-left: auto; }

/* 记录页：备份功能已迁移到个人中心的提示 */
.log-migrate-hint { font-size: 12px; color: var(--text-hint); margin-top: 28px; text-align: center; }

/* 桌面端两列底边齐平。
   左列内容天然比右列长得多（备份卡带快照列表，右列全是短表单），把左列压到等高不现实，
   所以反过来给**短的那一列**补：列容器已经等高（.profile-grid 的 align-items: stretch），
   每列最后一张卡 flex:1 吸收余量，卡内元素跟着长高，避免卡片底部出现一块死白。
   谁短谁被拉满，快照条数变化时不用重新调数值。
   ⚠️ 只限桌面 —— 窄屏 .profile-col 是 display:contents，卡片直接归 .profile-grid 管，
      那时 margin-bottom 才是唯一的卡片间距来源，不能清掉。 */
@media (min-width: 900px) {
  .profile-col > .profile-card { flex: 0 0 auto; }
  .profile-col > .profile-card:last-child { flex: 1 1 auto; margin-bottom: 0; }
  .profile-card[data-pcard="feedback"] { display: flex; flex-direction: column; }
  .profile-card[data-pcard="feedback"] h3 { flex: 0 0 auto; }
  /* ⚠️ 按钮必须 align-self: flex-start —— flex 列容器的默认 align-items: stretch
     会把只有内容宽的按钮拉成通栏（实测「发送反馈」直接占满整张卡）。 */
  .profile-card[data-pcard="feedback"] > .btn { flex: 0 0 auto; align-self: flex-start; }
  .profile-card[data-pcard="feedback"] .feedback-textarea { flex: 1 1 auto; }
  .profile-card[data-pcard="about"] { display: flex; flex-direction: column; }
  .profile-card[data-pcard="about"] h3 { flex: 0 0 auto; }
  .profile-card[data-pcard="about"] .about-list { flex: 1 1 auto; justify-content: space-between; }
}

/* 个人中心窄屏（<900px）回到单列。
   断点取 899px 而不是全局的 768px：768~899px 这段容器只有 700~850px，
   两列各剩 340~420px，而头像卡光内容就需要 302px（68px 预览 + 24px 间距 + 210px 头像网格
   ＝ 4×48 ＋ 3×6），会挤爆。
   ⚠️ 分组用 display:contents 抹平后，卡片靠 order 重新排序 —— 不能只抹平不排序，
   否则顺序会变成「左列整段 + 右列整段」（云端备份跑到昵称前面）。 */
@media (max-width: 899px) {
  /* align-items 必须显式改回 stretch：桌面规则是 flex-start，列向布局下会退化成
     「按内容宽度收缩」，卡片宽度各不相同（实测头像 404px、昵称 283px）。 */
  .profile-grid { flex-direction: column; align-items: stretch; }
  .profile-col { display: contents; }
  .profile-card[data-pcard="avatar"]   { order: 1; }
  .profile-card[data-pcard="nickname"] { order: 2; }
  .profile-card[data-pcard="email"]    { order: 3; }
  .profile-card[data-pcard="password"] { order: 4; }
  .profile-card[data-pcard="feedback"] { order: 5; }
  .profile-card[data-pcard="backup"]   { order: 6; }
  .profile-card[data-pcard="about"]    { order: 7; }
  .profile-card[data-pcard="danger"]   { order: 8; }
}

/* 删除确认 */
.delete-confirm-actions { display: flex; gap: 10px; margin-top: 18px; }
.feedback-skip { font-size: 13px; color: var(--text-hint); margin-top: 12px; text-align: center; cursor: pointer; }

/* ========== 页脚 ========== */
.site-footer {
  text-align: center;
  padding: 24px 20px 32px;
  font-size: 12px;
  color: var(--text-hint);
}

/* ========== 分类标签 ========== */
.cat-tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-hover);
  color: var(--text-secondary);
  margin-left: 4px;
  white-space: nowrap;
}
.task-cat-tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--accent-light);
  color: var(--accent);
  margin-left: 6px;
  white-space: nowrap;
}

/* ============================================================
   Web 启动遮罩 — 无缝衔接原生启动图
   ============================================================ */
#web-splash {
  position: fixed; inset: 0;
  z-index: 9999;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s ease;
}
#web-splash.fade-out { opacity: 0; pointer-events: none; }
.splash-chibao { width: 100px; height: auto; }

/* ============================================================
   移动端适配 — 全局
   ============================================================ */
@media (max-width: 768px) {

  /* ---- 隐藏顶部 Tab，只留 Logo + 用户 ---- */
  .nav-tabs { display: none; }
  .nav-inner { padding: 0 14px; height: 48px; }
  .nav-logo { margin-right: 0; font-size: 17px; }
  .nav-user-name { display: none; }

  /* ---- 主内容区 — 给底部导航留空间 ---- */
  .main { padding: 18px 14px 110px; }

  /* ---- 页面标题 ---- */
  .page-header { margin-bottom: 20px; }
  .page-header h1 { font-size: 20px; }
  .page-header .subtitle { font-size: 13px; }

  /* ---- 卡片 ---- */
  .card { padding: 16px; border-radius: 12px; }

  /* ---- 目标卡片 ---- */
  .goal-section { margin-bottom: 24px; }
  .goal-section-header { margin-bottom: 10px; }
  /* 窄屏改网格布局：正文独占整行（不再被进度条和按钮挤成碎行），
     进度条与操作按钮合占第二行，三个按钮不再溢出屏幕 */
  .goal-card-main {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    grid-template-areas:
      "dot  content content"
      "prog prog    acts";
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
  }
  .goal-card-priority { grid-area: dot; }
  .goal-card-content { grid-area: content; min-width: 0; }
  .goal-card-text { font-size: 14px; }
  .goal-card-progress { grid-area: prog; margin-left: 0; }
  .goal-progress-bar { width: auto; flex: 1; max-width: 140px; }
  .goal-card-actions { grid-area: acts; justify-content: flex-end; }
  .goal-card-meta { font-size: 11px; gap: 8px; }
  .goal-expand { padding: 0 14px 14px; }

  /* 目标树窄屏缩进压缩（层级仍由左侧竖线体现），避免正文宽度被吃掉 */
  .goal-card.goal-child { margin-left: 10px !important; }
  .goal-card.goal-depth-2,
  .goal-card.goal-depth-3 { margin-left: 20px !important; }
  .goal-card.goal-depth-4,
  .goal-card.goal-depth-5 { margin-left: 30px !important; }

  /* ---- 日排表 ---- */
  .daily-layout { gap: 14px; }
  .status-panel { padding: 14px 16px; gap: 12px; }
  .status-streak { font-size: 24px; min-width: 40px; }
  .status-msg { font-size: 14px; }
  .daily-date-text { font-size: 16px; min-width: 100px; }
  .energy-btn { width: 40px; height: 40px; font-size: 20px; }
  .shichen-grid { grid-template-columns: repeat(3,1fr); gap: 5px; }
  .shichen-cell { padding: 8px 4px; font-size: 11px; }
  .shichen-cell .shichen-emoji { font-size: 14px; }
  /* ---- 日排表 · 任务条：窄屏改两行 ----
     一条任务里挤了 8 个元素（勾选框/输入框/目标/标签/计时/时长/待定/删除），
     窄屏一行放不下（实测 390px 溢出 140~264px、320px 溢出 205~334px），
     改为：文本独占第一行，附属控件整体退到第二行，第二行放不下再自动换行。 */
  .task-item {
    flex-wrap: wrap;
    column-gap: 10px;
    row-gap: 8px;
    padding: 10px 12px;
  }
  /* 勾选框 20px + 间距 10px = 30px，文本正好占满第一行剩余宽度 */
  .task-text {
    flex: 1 1 calc(100% - 30px);
    min-width: 0;
    font-size: 13px;
  }
  /* 附属控件容器：第二行，放不下自动换行；删除键推到最右 */
  .task-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    flex: 1 1 100%;
  }
  /* 目标名 / 标签过长时省略号截断，避免把第二行撑爆 */
  .task-goal {
    max-width: 88px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .task-tag {
    max-width: 76px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .task-delete { margin-left: auto; }
  .daily-textarea { min-height: 60px; font-size: 13px; padding: 12px; }

  /* ---- 内容页 ---- */
  .content-filters { gap: 6px; }
  .content-filters select { font-size: 12px; padding: 7px 28px 7px 10px; }
  .content-card { padding: 14px 16px; }
  .content-card-title { font-size: 14px; }

  /* ---- 进度页 ---- */
  .progress-grid { grid-template-columns: 1fr; gap: 14px; }
  .progress-card { padding: 16px; }

  /* ---- 记录页 ---- */
  .log-entry { flex-direction: column; gap: 2px; padding: 10px 0; }
  .log-date { min-width: auto; font-size: 12px; }
  .log-summary { font-size: 13px; }

  /* ---- 弹窗 — 接近全屏 ---- */
  .modal { align-items: flex-end; }
  .modal-inner {
    max-width: 100%;
    width: 100%;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
    padding: 22px 18px 28px;
  }
  .modal-inner h3 { font-size: 16px; margin-bottom: 14px; }
  .modal-inner label { font-size: 12px; }
  .modal-inner input[type="text"],
  .modal-inner textarea,
  .modal-inner select { font-size: 13px; padding: 10px 12px; }
  .modal-actions { margin-top: 16px; flex-wrap: wrap; }

  /* ---- 认证页 ---- */
  .auth-page { padding: 20px 14px 52px; }
  .auth-card { padding: 28px 22px; }
  .auth-card h1 { font-size: 22px; }

  /* ---- 个人中心 ---- */
  .profile-card { padding: 16px 18px; }
  .avatar-section { flex-direction: column; gap: 16px; align-items: center; }
  .avatar-options { width: 100%; }
  .cartoon-avatar-grid { grid-template-columns: repeat(4,1fr); max-width: 100%; }

  /* ---- 页脚 ---- */
  .site-footer { padding: 14px 20px 100px; }
  /* 中文版权独占第二行居中（桌面端不加此规则，保持单行） */
  .site-footer .footer-cn { display: block; white-space: nowrap; }
}

/* ============================================================
   底部导航栏（仅移动端）
   ============================================================ */
.bottom-nav {
  display: none !important;
}
.force-hide { display: none !important; }
@media (max-width: 768px) {
  .bottom-nav.show {
    display: flex !important;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(254,252,246,0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border-light);
    z-index: 300;
    padding-bottom: env(safe-area-inset-bottom, 6px);
    padding-top: 2px;
  }

  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 2px 6px;
    gap: 1px;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    background: none;
    font-family: var(--font);
    color: var(--text-hint);
    font-size: 11px;
    font-weight: 400;
    transition: color 0.15s, background 0.1s;
    -webkit-tap-highlight-color: transparent;
    height: 70px;
    line-height: 1.2;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    outline: none;
  }
  .bottom-nav-item:active {
    background: rgba(0,0,0,0.04);
  }

  .bottom-nav-item .nav-icon {
    font-size: 22px;
    line-height: 1.1;
  }

  .bottom-nav-item .nav-label-en {
    font-size: 9px;
    font-weight: 400;
    color: inherit;
    line-height: 1.2;
    opacity: 0.7;
  }

  .bottom-nav-item .nav-label-cn {
    font-size: 11px;
    font-weight: 400;
    color: inherit;
    line-height: 1.2;
    text-align: center;
  }

  .bottom-nav-item.active {
    color: var(--accent);
    font-weight: 500;
  }
}

/* ============================================================
   触控增强 — 全局
   ============================================================ */
@media (max-width: 768px) {
  .btn { min-height: 40px; padding: 9px 18px; }
  .btn-sm { min-height: 34px; padding: 6px 14px; font-size: 13px; }
  input[type="checkbox"] { min-width: 20px; min-height: 20px; }
  input[type="range"] { min-height: 30px; }
}

/* ===== 周报 / 月报提示（自用版） ===== */
.report-reminder { margin-bottom: 16px; }
.report-reminder-card {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #3c3628, #57503d);
  color: #fefcf6; border-radius: 12px; padding: 14px 18px;
  box-shadow: 0 4px 16px rgba(60,54,40,0.18);
  animation: report-slide-in 0.4s ease;
}
@keyframes report-slide-in { from{opacity:0;transform:translateY(-8px);} to{opacity:1;transform:translateY(0);} }
.report-reminder-icon { font-size: 26px; flex-shrink: 0; }
.report-reminder-body { flex: 1; min-width: 0; }
.report-reminder-title { font-weight: 600; font-size: 15px; }
.report-reminder-desc { font-size: 12px; color: rgba(254,252,246,0.75); margin-top: 2px; }
.report-reminder-btn {
  flex-shrink: 0; background: #c8a44c; color: #3c3628; border: none;
  border-radius: 8px; padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.report-reminder-btn:hover { background: #dab75e; }
.report-reminder-close { flex-shrink:0; background:transparent; color:rgba(254,252,246,0.6); border:none; font-size:20px; cursor:pointer; padding:0 4px; line-height:1; }
.report-reminder-close:hover { color:#fff; }
/* 弹窗统计 */
.report-stats { display:flex; gap:12px; margin-bottom:16px; }
.report-stat { flex:1; background: var(--bg); border-radius:10px; padding:14px; text-align:center; }
.report-stat-num { font-size:24px; font-weight:700; color:#b8860b; }
.report-stat-label { font-size:12px; color: var(--text-hint); margin-top:2px; }
.report-section { margin-bottom:14px; }
.report-section-title { font-size:13px; font-weight:600; color: var(--text-hint); margin-bottom:8px; }
.report-chips { display:flex; flex-wrap:wrap; gap:6px; }
.chip { background:#f3ece0; color:#8a6d1d; border-radius:20px; padding:4px 12px; font-size:12px; }
.chip-warn { background:#f7e9e0; color:#a0522d; }
.report-textarea { width:100%; min-height:80px; resize:vertical; font-family:inherit; }
.report-monitor-line { font-size:13px; color:#a0522d; padding:3px 0; }
.report-reflections { max-height:180px; overflow-y:auto; }
.report-reflection { font-size:13px; color:var(--text-secondary); padding:4px 0; border-bottom:1px dashed var(--bg-active); }
.report-reflection-day { color:#b8860b; font-weight:600; margin-right:8px; font-size:12px; }

/* 周报/月报全局横幅 */
.report-reminder-global {
  position: fixed;
  top: 68px; /* 避开顶部导航栏（sticky top:0 约56px高） */
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 560px);
  z-index: 1000;
  pointer-events: none; /* 横幅容器不拦截点击，避免 fixed 悬浮时压住下方控件（如日排表页精力/活跃时段） */
}
.report-reminder-global .report-reminder-card {
  box-shadow: 0 8px 28px rgba(60,54,40,0.35);
  pointer-events: auto; /* 卡片本体恢复可点（写笔记 / × 按钮） */
}
/* 横幅显示时，页面内容整体下移，避免被 fixed 横幅遮挡（如日排表页精力/活跃时段无法点击） */
body.report-shown .main {
  padding-top: 108px;
}

/* 周报/月报历史记录 */
.report-history-list { display: flex; flex-direction: column; gap: 6px; }
.report-history-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--border);
  cursor: pointer; transition: background 0.15s;
}
.report-history-item:hover { background: var(--bg-hover); }
.report-history-mark { font-size: 14px; }
.report-history-type { font-size: 12px; font-weight: 600; color: var(--accent); width: 34px; }
.report-history-date { font-size: 12px; color: var(--text-secondary); width: 90px; }
.report-history-preview { flex: 1; font-size: 12px; color: var(--text-hint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-history-arrow { color: var(--text-hint); font-size: 16px; }
/* 报告详情弹窗 */
.report-detail-body { max-height: 55vh; overflow-y: auto; }
.report-detail-section { margin-bottom: 14px; }
.report-detail-label { font-size: 12px; font-weight: 600; color: var(--text-hint); margin-bottom: 6px; }
.report-detail-text {
  font-size: 14px; line-height: 1.7; color: var(--text);
  background: var(--bg); border-radius: 8px; padding: 10px 12px;
  white-space: pre-wrap; word-break: break-word;
}

/* 目标标签 */
.goal-card-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.goal-tag-chip {
  font-size: 10px; color: #8a6d1d;
  background: rgba(139,109,29,0.10);
  border: 1px solid rgba(139,109,29,0.25);
  border-radius: 10px; padding: 1px 8px;
  white-space: nowrap;
}

/* 登录页：页面底部版权（单行） */
.auth-page-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  text-align: center;
  font-size: 11px;
  line-height: 1.8;
  color: var(--text-hint);
  letter-spacing: 0.1px;
}
.auth-page-foot a {
  color: var(--text-hint);
  text-decoration: none;
  border-bottom: 1px dashed var(--border-light);
  padding-bottom: 1px;
}
.auth-page-foot a:hover { color: var(--accent); border-bottom-color: var(--accent); }
