/* ===== 我的日常工作台 v0.5 ===== */
/* 左侧导航 + 月历 + 孕期记录 + 待产包 + 运动 */

:root {
  --bg: #f2f2f7;
  --bg-card: #ffffff;
  --bg-input: #f2f2f7;
  --bg-hover: #e5e5ea;
  --bg-sidebar: #f9f9fb;
  --text-primary: #1c1c1e;
  --text-secondary: #8e8e93;
  --text-tertiary: #c7c7cc;
  --blue: #007aff;
  --blue-light: #e8f2ff;
  --red: #ff3b30;
  --red-light: #ffeeed;
  --green: #34c759;
  --green-light: #e8f8ed;
  --orange: #ff9500;
  --orange-light: #fff4e5;
  --purple: #af52de;
  --border: #e5e5ea;
  --border-light: #f0f0f5;
  --shadow: 0 1px 3px rgba(0,0,0,0.06);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --nav-width: 60px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1c1e;
    --bg-card: #2c2c2e;
    --bg-input: #3a3a3c;
    --bg-hover: #3a3a3c;
    --bg-sidebar: #242426;
    --text-primary: #f2f2f7;
    --text-secondary: #98989d;
    --text-tertiary: #636366;
    --blue: #0a84ff;
    --blue-light: #1a3a5c;
    --red: #ff453a;
    --red-light: #3d1a1a;
    --green: #30d158;
    --green-light: #1a3d22;
    --orange: #ff9f0a;
    --orange-light: #3d2a0a;
    --border: #48484a;
    --border-light: #3a3a3c;
    --shadow: none;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: var(--safe-top);
}

.app-shell {
  width: 100%;
  max-width: 500px;
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
}

/* ===== 左侧导航栏 ===== */
.sidebar {
  width: var(--nav-width);
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 8px;
  padding-bottom: calc(8px + var(--safe-bottom));
  border-right: 1px solid var(--border-light);
  flex-shrink: 0;
  gap: 4px;
}

.nav-item {
  width: 48px;
  height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 11px;
  font-family: inherit;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.nav-item .nav-icon {
  font-size: 20px;
  line-height: 1;
  margin-bottom: 3px;
}

.nav-item .nav-label {
  font-size: 10px;
  line-height: 1;
}

.nav-item:active {
  background: var(--bg-hover);
}

.nav-item.active {
  background: var(--blue-light);
  color: var(--blue);
}

/* ===== 右侧内容区 ===== */
.content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--safe-bottom) + 20px);
}

.page {
  display: none;
  padding: 16px 14px;
}

.page.active {
  display: block;
}

/* 页面标题 */
.page-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

/* ===== 卡片 ===== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border-light);
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

/* ===== 随手记输入区 ===== */
.quick-note {
  margin-bottom: 16px;
}

.quick-note-input {
  width: 100%;
  min-height: 44px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
  resize: none;
}

.quick-note-input:focus {
  border-color: var(--blue);
}

.quick-note-input::placeholder {
  color: var(--text-tertiary);
}

.quick-note-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

/* ===== 表单 ===== */
input[type="text"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
}

textarea {
  resize: vertical;
  min-height: 60px;
}

.form-group {
  margin-bottom: 12px;
}

.form-label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  font-weight: 500;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  gap: 6px;
}

.btn:active { opacity: 0.7; }

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-danger {
  background: var(--red);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn-small {
  min-height: 32px;
  padding: 5px 12px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  min-width: 40px;
  min-height: 40px;
  padding: 0;
}

/* ===== 今日页面 ===== */
.today-date {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 2px;
}

.today-weekday {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* 今日要事 */
.top3-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

.top3-item:last-child {
  border-bottom: none;
}

.top3-rank {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.top3-rank.r1 { background: var(--red); }
.top3-rank.r2 { background: var(--orange); }
.top3-rank.r3 { background: var(--blue); }

.top3-text {
  flex: 1;
  font-size: 14px;
}

/* 速览卡片 */
.summary-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.summary-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  border: 1px solid var(--border-light);
}

.summary-card .val {
  font-size: 20px;
  font-weight: 600;
  margin-top: 4px;
}

.summary-card .lbl {
  font-size: 12px;
  color: var(--text-secondary);
}

/* 过期提醒 */
.overdue-badge {
  display: inline-block;
  background: var(--red-light);
  color: var(--red);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
  margin-left: 6px;
}

.overdue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

.overdue-item:last-child {
  border-bottom: none;
}

/* ===== 月历视图 ===== */
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.calendar-month {
  font-size: 16px;
  font-weight: 600;
}

.calendar-nav {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
}

.calendar-nav:active {
  background: var(--bg-hover);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  color: var(--text-secondary);
  padding: 6px 0;
  font-weight: 500;
}

.calendar-weekdays .weekend {
  color: var(--red);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 13px;
  cursor: pointer;
  position: relative;
  transition: background 0.1s;
  min-height: 36px;
}

.calendar-day:active {
  background: var(--bg-hover);
}

.calendar-day.today {
  background: var(--blue);
  color: #fff;
  font-weight: 600;
}

.calendar-day.selected {
  border: 2px solid var(--blue);
  color: var(--blue);
  font-weight: 600;
}

.calendar-day.today.selected {
  border-color: #fff;
}

.calendar-day.other-month {
  color: var(--text-tertiary);
}

.calendar-dot {
  position: absolute;
  bottom: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
}

.calendar-day.today .calendar-dot {
  background: #fff;
}

/* 当日日程列表 */
.day-schedule {
  margin-top: 8px;
}

.day-schedule-date {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.schedule-item {
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  border: 1px solid var(--border-light);
  align-items: flex-start;
}

.schedule-time {
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 40px;
  flex-shrink: 0;
}

.schedule-content {
  flex: 1;
  font-size: 13px;
}

.schedule-cat {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-right: 6px;
}

.schedule-cat.cat-personal { background: var(--blue-light); color: var(--blue); }
.schedule-cat.cat-family { background: var(--green-light); color: var(--green); }
.schedule-cat.cat-work { background: var(--orange-light); color: var(--orange); }

.no-data {
  text-align: center;
  color: var(--text-tertiary);
  padding: 24px 0;
  font-size: 13px;
}

/* ===== 待办列表 ===== */
.todo-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.todo-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  background: transparent;
  transition: all 0.15s;
}

.todo-check.done {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  font-size: 12px;
}

.todo-body {
  flex: 1;
  min-width: 0;
}

.todo-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.todo-title.done-text {
  text-decoration: line-through;
  color: var(--text-secondary);
}

.todo-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--text-secondary);
  align-items: center;
}

.todo-priority {
  font-size: 14px;
}

.tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.tag-personal { background: var(--blue-light); color: var(--blue); }
.tag-family { background: var(--green-light); color: var(--green); }
.tag-work { background: var(--orange-light); color: var(--orange); }

/* 状态标签 */
.status-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

.status-todo { background: var(--bg-input); color: var(--text-secondary); }
.status-doing { background: var(--blue-light); color: var(--blue); }
.status-done { background: var(--green-light); color: var(--green); }

/* ===== 记账列��� ===== */
.txn-item {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 6px;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.txn-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.txn-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.txn-icon.income { background: var(--green-light); }
.txn-icon.expense { background: var(--red-light); }

.txn-info {
  min-width: 0;
}

.txn-cat {
  font-size: 13px;
  font-weight: 500;
}

.txn-meta {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.txn-amount {
  font-size: 16px;
  font-weight: 600;
  flex-shrink: 0;
}

.txn-amount.income { color: var(--green); }
.txn-amount.expense { color: var(--red); }

/* 收支概览 */
.finance-overview {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.finance-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 12px 8px;
  text-align: center;
  border: 1px solid var(--border-light);
}

.finance-card .fc-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.finance-card .fc-value {
  font-size: 16px;
  font-weight: 600;
}

.fc-income { color: var(--green); }
.fc-expense { color: var(--red); }
.fc-balance { color: var(--blue); }

/* ===== 统计页面 ===== */
.stats-section {
  margin-bottom: 20px;
}

.stats-section-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

.category-bar {
  margin-bottom: 6px;
}

.category-bar .cb-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 4px;
}

.category-bar .cb-track {
  height: 8px;
  background: var(--bg-input);
  border-radius: 4px;
  overflow: hidden;
}

.category-bar .cb-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s;
}

.trend-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 120px;
  padding: 0 4px;
}

.trend-bar-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.trend-bar {
  width: 100%;
  border-radius: 4px 4px 0 0;
  background: var(--blue);
  min-height: 4px;
  transition: height 0.3s;
}

.trend-bar.highlight {
  background: var(--red);
}

.trend-label {
  font-size: 10px;
  color: var(--text-secondary);
}

/* ===== 数据管理页面 ===== */
.data-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.data-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  text-align: left;
}

.data-action-btn:active {
  background: var(--bg-hover);
}

.data-action-btn .action-icon {
  font-size: 20px;
  width: 32px;
  text-align: center;
}

/* ===== 模态框 ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  width: 100%;
  max-width: 360px;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

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

/* ===== Toast ===== */
.toast-container {
  position: fixed;
  top: calc(16px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--text-primary);
  color: var(--bg);
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2s forwards;
  white-space: nowrap;
}

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

@keyframes toastOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ===== 版本更新提示 ===== */
.update-banner {
  background: var(--blue-light);
  border: 1px solid var(--blue);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.update-banner-text {
  font-size: 13px;
  color: var(--blue);
  font-weight: 500;
}

/* ===== 确认对话框 ===== */
.confirm-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.confirm-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  width: 100%;
  max-width: 300px;
  text-align: center;
}

.confirm-msg {
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.confirm-btns {
  display: flex;
  gap: 10px;
}

.confirm-btns .btn {
  flex: 1;
}

/* ===== 图标空状态 ===== */
.empty-icon {
  font-size: 40px;
  margin-bottom: 8px;
}

/* ===== 工具类 ===== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-secondary { color: var(--text-secondary); }
.text-small { font-size: 12px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.flex-wrap { display: flex; flex-wrap: wrap; }

/* 文件导入隐藏 input */
.file-input-hidden {
  display: none;
}

/* 响应式调整 */
@media (max-width: 380px) {
  .sidebar { width: 52px; }
  :root { --nav-width: 52px; }
  .nav-item { width: 42px; height: 48px; }
  .nav-item .nav-icon { font-size: 18px; }
  .nav-item .nav-label { font-size: 9px; }
  .page { padding: 12px 10px; }
}

/* 横屏时限制宽度 */
@media (min-width: 501px) {
  .app-shell {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
}

/* ===== 指令中心 ===== */
.command-item {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 4px;
}

.command-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.cmd-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.cmd-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

.cmd-pending { background: var(--orange-light); color: var(--orange); }
.cmd-processing { background: var(--blue-light); color: var(--blue); animation: pulse 1.5s infinite; }
.cmd-done { background: var(--green-light); color: var(--green); }
.cmd-failed { background: var(--red-light); color: var(--red); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.cmd-time {
  font-size: 11px;
  color: var(--text-tertiary);
}

.cmd-text {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.4;
}

.cmd-result {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
  padding: 6px 8px;
  background: var(--bg-input);
  border-radius: 4px;
  line-height: 1.4;
}

/* ===== 孕期记录 ===== */
.preg-week-display {
  text-align: center;
  padding: 12px 0;
}

.preg-week-num {
  font-size: 36px;
  font-weight: 700;
  color: var(--blue);
}

.preg-week-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.preg-countdown {
  font-size: 12px;
  color: var(--orange);
  margin-top: 8px;
  font-weight: 500;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
}

.check-item:last-child {
  border-bottom: none;
}

.check-item .check-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  transition: all 0.2s;
}

.check-item.checked .check-circle {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.check-item .check-label {
  flex: 1;
  font-size: 14px;
}

.check-item.checked .check-label {
  text-decoration: line-through;
  color: var(--text-secondary);
}

.checkup-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.checkup-item:last-child {
  border-bottom: none;
}

.checkup-info {
  flex: 1;
}

.checkup-name {
  font-size: 14px;
  font-weight: 500;
}

.checkup-date {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.recipe-day {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

.recipe-day:last-child {
  border-bottom: none;
}

.recipe-meal {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 4px;
}

.recipe-food {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
}

.weight-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

.weight-item:last-child {
  border-bottom: none;
}

.weight-change {
  font-size: 12px;
  font-weight: 500;
}

.weight-change.up { color: var(--red); }
.weight-change.down { color: var(--green); }

/* ===== 待产包 ===== */
.bag-category {
  margin-bottom: 16px;
}

.bag-category-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  padding: 6px 10px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
}

.bag-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
}

.bag-item:last-child {
  border-bottom: none;
}

.bag-item .bag-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  transition: all 0.2s;
}

.bag-item.packed .bag-check {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.bag-item .bag-name {
  flex: 1;
  font-size: 13px;
}

.bag-item.packed .bag-name {
  text-decoration: line-through;
  color: var(--text-secondary);
}

.bag-progress {
  text-align: center;
  padding: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.bag-progress-bar {
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  margin-top: 6px;
  overflow: hidden;
}

.bag-progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 3px;
  transition: width 0.3s;
}

/* ===== 运动 ===== */
.exercise-stage {
  text-align: center;
  padding: 12px;
}

.exercise-stage-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--blue);
}

.exercise-stage-week {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.exercise-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.exercise-item:last-child {
  border-bottom: none;
}

.exercise-name {
  font-size: 14px;
  font-weight: 500;
}

.exercise-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.4;
}

.exercise-duration {
  font-size: 11px;
  color: var(--orange);
  margin-top: 4px;
}

.video-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.video-item:last-child {
  border-bottom: none;
}

.video-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--red-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.video-info {
  flex: 1;
  min-width: 0;
}

.video-title {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-source {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.video-link {
  color: var(--blue);
  text-decoration: none;
  font-size: 12px;
  flex-shrink: 0;
}

.exercise-note {
  font-size: 12px;
  color: var(--orange);
  padding: 8px 10px;
  background: var(--orange-light);
  border-radius: var(--radius-sm);
  margin-top: 10px;
  line-height: 1.5;
}

/* ===== 孕期页面增强 v0.6 ===== */
.preg-hint {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-tertiary);
  margin-left: 4px;
}

/* 标准产检时间表 */
.std-checkup-item {
  display: flex;
  gap: 10px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  margin-bottom: 8px;
  align-items: flex-start;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.std-checkup-item.current {
  border-color: var(--blue);
  background: var(--blue-light);
}

.std-checkup-item.done {
  opacity: 0.62;
}

.std-checkup-body {
  flex: 1;
  min-width: 0;
}

.std-checkup-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}

.std-checkup-week {
  font-size: 11px;
  font-weight: 600;
  color: var(--purple);
  background: rgba(175, 82, 222, 0.12);
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}

.std-checkup-item.past:not(.done) .std-checkup-week {
  color: var(--orange);
  background: var(--orange-light);
}

.std-checkup-item.current .std-checkup-week {
  color: var(--blue);
  background: #fff;
}
@media (prefers-color-scheme: dark) {
  .std-checkup-item.current .std-checkup-week { background: transparent; }
}

.std-checkup-title {
  font-size: 14px;
  font-weight: 600;
}

.std-checkup-item.done .std-checkup-title {
  text-decoration: line-through;
  color: var(--text-secondary);
}

.std-checkup-items {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.std-checkup-tag-now {
  font-size: 10px;
  color: #fff;
  background: var(--blue);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

/* 食谱三餐+加餐 */
.meal-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border-light);
}

.meal-row:last-child {
  border-bottom: none;
}

.meal-type {
  width: 52px;
  flex-shrink: 0;
  text-align: center;
}

.meal-type-icon {
  font-size: 20px;
  line-height: 1.2;
}

.meal-type-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.meal-body {
  flex: 1;
  min-width: 0;
}

.meal-name {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.meal-note {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.meal-refresh-one {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.meal-refresh-one:active {
  background: var(--bg-hover);
}

.preg-diet-note {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 10px;
  padding: 8px 10px;
  background: var(--orange-light);
  border-radius: var(--radius-sm);
  line-height: 1.5;
}

/* 体重图表 */
.weight-chart-wrap {
  position: relative;
  width: 100%;
  margin-bottom: 6px;
}

#weightChartSvg {
  width: 100%;
  height: auto;
  display: block;
}

.weight-tooltip {
  position: absolute;
  background: var(--text-primary);
  color: var(--bg);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.4;
  pointer-events: none;
  z-index: 10;
  white-space: nowrap;
  transform: translate(-50%, -110%);
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.weight-tooltip::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -5px;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--text-primary);
}

/* 跟练视频分组 */
.video-cat {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 10px 0 4px;
}

.video-cat:first-child {
  margin-top: 0;
}
