/* H5 宝宝喂养记录 - 全局样式 */

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

html {
  overflow-y: scroll;
}

:root {
  --primary: #2f7d6d;
  --primary-hover: #266b5d;
  --primary-light: #e6f4ef;
  --danger: #b34a3e;
  --danger-light: #fff0ed;
  --bg: #fbfaf7;
  --bg-active: rgba(0, 0, 0, 0.05);
  --card-bg: #ffffff;
  --border: #ece7dd;
  --text: #2b2925;
  --text-muted: #7b7368;
  --pill-bg: #f4f0e8;
  --active-border: #83b9aa;
  --hover-bg: #f4f0e8;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  padding-bottom: 78px;
}

#app {
  max-width: 540px;
  margin: 0 auto;
  width: 100%;
  min-height: 100vh;
  min-height: -webkit-fill-available;
}

/* 顶部区域 */
.header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 12px 12px;
}

.header-baby {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
}

.header-info {
  flex: 1;
}

.header-name {
  font-size: 16px;
  font-weight: 700;
}

.header-age {
  font-size: 12px;
}

.header-arrow {
  color: var(--text-muted);
  font-size: 20px;
}

/* 主内容区 */
.main {
  padding: 16px 12px;
  padding-bottom: 90px;
}

/* 登录页面 */
.login-container {
  max-width: 360px;
  margin: 0 auto;
  padding: 40px 20px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo {
  font-size: 64px;
  margin-bottom: 16px;
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

.login-form {
  padding: 24px;
}

.login-form .field {
  margin-bottom: 16px;
}

.login-form .field:last-of-type {
  margin-bottom: 20px;
}

.form-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.login-btn {
  width: 100%;
  padding: 14px;
  font-size: 16px;
}

.login-footer {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 16px;
}

.link-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 14px;
  cursor: pointer;
  padding: 0;
}

.link-btn:hover {
  text-decoration: underline;
}

/* 跨天提示 */
.cross-day-hint {
  padding: 8px 12px;
  background: #FFF7E6;
  color: #D87A00;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.4;
}

/* 日志头部（同步信息） */
.log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.sync-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sync-btn {
  padding: 4px 12px;
  font-size: 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.sync-btn:active {
  opacity: 0.8;
}

/* 主页面 */
.page {
  animation: fadeIn 0.2s ease;
  padding: 0 12px;
}

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

.section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

/* 卡片 */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(73, 61, 46, 0.06);
}

/* 快速操作按钮 */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s;
}

.quick-btn:hover {
  background: var(--hover-bg);
}

.quick-icon {
  font-size: 28px;
}

.quick-btn span:last-child {
  font-size: 13px;
  color: var(--text);
}

/* 图标按钮 */
.icon-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
}

/* 记录列表 */
.record-list {
  padding: 0;
}

.record-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}

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

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

.record-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.record-title {
  font-weight: 700;
  font-size: 15px;
}

.record-user {
  font-size: 12px;
  color: var(--text-muted);
}

.record-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.record-status {
  font-size: 12px;
  color: var(--primary);
}

/* 表单 */
.form {
  padding: 16px;
}

.form .field {
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.input, .textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #e3ddd2;
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
  color: var(--text);
}

.textarea {
  min-height: 80px;
  resize: vertical;
}

.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* 两列布局 */
.two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* 胶囊按钮组 */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  background: var(--pill-bg);
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 13px;
  padding: 10px 12px;
  min-height: 40px;
  flex: 1 1 calc(50% - 4px);
  max-width: calc(50% - 4px);
  cursor: pointer;
  transition: all 0.15s;
}

.pill.active {
  background: var(--primary-light);
  border-color: var(--active-border);
  color: var(--primary);
  font-weight: 700;
}

.pill:active {
  transform: scale(0.96);
}

/* 按钮 */
.primary-btn, .secondary-btn, .danger-btn {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  margin-top: 12px;
  text-align: center;
}

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

.secondary-btn {
  background: var(--primary-light);
  color: var(--primary);
}

.danger-btn {
  background: var(--danger-light);
  color: var(--danger);
}

/* 快速记录面板 */
.nursing-panel, .sleep-panel {
  background: var(--primary-light);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}

.nursing-status, .sleep-status {
  font-size: 14px;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 8px;
}

.nursing-time, .sleep-time {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.nursing-actions, .sleep-actions {
  margin-top: 12px;
}

.nursing-actions button, .sleep-actions button {
  margin: 0;
}

/* 菜单 */
.menu {
  overflow: hidden;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: transparent;
  border-left: none;
  border-right: none;
  border-top: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
}

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

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

.menu-title {
  font-weight: 700;
  margin-bottom: 2px;
}

.menu-item span {
  color: var(--text-muted);
  font-size: 20px;
}

/* 退出按钮 */
.leave-family {
  width: 100%;
  padding: 14px;
  background: #fff;
  border: 1px solid #f1c7be;
  border-radius: 999px;
  color: var(--danger);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

/* 宝宝档案弹窗内的弱化"退出宝宝管理"链接（防误触） */
.leave-family-link {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s ease;
}

.leave-family-link:hover,
.leave-family-link:active {
  opacity: 1;
}

/* 底部导航 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  padding: 6px 4px 2px;
  padding-bottom: max(6px, env(safe-area-inset-bottom));
  width: 100%;
  max-width: 540px;
  z-index: 100;
}

.nav-item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #9AA0A6;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.18s ease;
}

.nav-item:active .nav-svg {
  animation: navTap 0.28s ease-out;
}

.nav-item.active:active .nav-svg--fill {
  animation: navTapFill 0.28s ease-out;
}

.nav-item .nav-svg {
  transform-origin: center;
}

.nav-icon-wrap {
  display: grid;
  width: 28px;
  height: 28px;
  line-height: 0;
  font-size: 0;
  margin: 0;
  padding: 0;
  contain: paint;
}

.nav-item .nav-svg svg {
  width: 100%;
  height: 100%;
  display: block;
  vector-effect: non-scaling-stroke;
  shape-rendering: geometricPrecision;
}

.nav-item .nav-svg--line,
.nav-item .nav-svg--fill {
  grid-area: 1 / 1;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  overflow: visible;
}




.nav-item .nav-svg--fill {
  opacity: 0;
  pointer-events: none;
}

.nav-item.active {
  color: #2b6f7d;
}

.nav-item.active .nav-svg--line {
  opacity: 0;
}

/* 待办tab无填充图标，选中时保持线条图标可见 */
.nav-item.active[data-tab="todo"] .nav-svg--line {
  opacity: 1;
}

.nav-item.active .nav-svg--fill {
  opacity: 1;
  animation: navPop 0.28s ease-out;
  will-change: opacity;
}

.nav-item.active .nav-label {
  color: #2b6f7d;
  font-weight: 600;
}

.nav-label {
  font-size: 11px;
  line-height: 1;
  color: inherit;
  display: block;
  height: 12px;
  margin: 0;
  padding: 0;
  transition: color 0.18s ease;
}

/* 中间加号按钮 */
.nav-item--center {
  flex: 0 0 auto;
  padding: 0;
  margin: 0 4px;
}

.nav-item--center::before {
  content: "";
  position: absolute;
  top: calc(50% - 5px);
  left: 50%;
  width: 62px;
  height: 62px;
  background: rgba(43, 111, 125, 0.18);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-item--center:active::before {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.nav-center-bubble {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #3a8da0 0%, #2b6f7d 55%, #1a5566 100%);
  color: #FFFFFF;
  border-radius: 50%;
  box-shadow:
    0 4px 10px rgba(43, 111, 125, 0.40),
    0 2px 4px rgba(43, 111, 125, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  margin-top: -4px;
  margin-bottom: 0;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.nav-center-bubble svg {
  width: 24px;
  height: 24px;
  display: block;
}

.nav-item--center:active .nav-center-bubble {
  transform: translateY(1px) scale(0.96);
  box-shadow:
    0 3px 8px rgba(43, 111, 125, 0.30),
    0 1px 2px rgba(43, 111, 125, 0.20);
}

/* 待办角标 */
.nav-badge {
  position: absolute;
  top: 0;
  right: calc(50% - 16px);
  background: #FF3B30;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 0 0 2px #FFFFFF;
  animation: badgePulse 1.6s ease-in-out infinite;
  line-height: 1;
}

.nav-badge[data-many="1"] {
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  font-size: 9px;
}

@keyframes navPop {
  0%   { opacity: 0.6; }
  60%  { opacity: 1; }
  100% { opacity: 1; }
}

@keyframes navTap {
  0%   { transform: scale(1);    filter: none; }
  40%  { transform: scale(0.9);  filter: brightness(0.95); }
  70%  { transform: scale(1.1);  filter: drop-shadow(0 0 4px rgba(43,111,125,0.55)); }
  100% { transform: scale(1);    filter: none; }
}

@keyframes navTapFill {
  0%   { transform: scale(1);    filter: none; }
  50%  { transform: scale(0.92); filter: brightness(1.15) drop-shadow(0 0 6px rgba(43,111,125,0.6)); }
  100% { transform: scale(1);    filter: none; }
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1);    box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 0 rgba(255,59,48,0.45); }
  50%      { transform: scale(1.08); box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 6px rgba(255,59,48,0); }
}
/* 待办列表 */
.todo-list {
  padding: 0;
}

.todo-item {
  display: flex;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}

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

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

.todo-item.completed {
  opacity: 0.6;
}

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

.todo-icon {
  font-size: 18px;
  margin-right: 8px;
  flex-shrink: 0;
}

.todo-content {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.todo-title {
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
}

.todo-badge {
  display: inline-block;
  font-size: 10px;
  background: var(--primary);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: auto;
}

.todo-medicine {
  display: inline-block;
  font-size: 12px;
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
  font-weight: 500;
}

/* 待办复选框 */
.todo-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid var(--primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  font-size: 14px;
  color: white;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.todo-checkbox.checked {
  background: var(--primary);
  border-color: var(--primary);
}

.todo-checkbox:active {
  transform: scale(0.9);
}

/* 已选预设模板提示 */
.selected-template-info {
  background: var(--primary-light);
  border: 1px solid var(--active-border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.selected-icon {
  font-size: 18px;
}

.change-template-btn {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--primary);
  border-radius: 4px;
  color: var(--primary);
  font-size: 12px;
  padding: 2px 8px;
  cursor: pointer;
}

/* 待办页面头部 */
#pageTodo.page {
  padding: 0 4px;
}

.todo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  margin-bottom: 8px;
}

.manage-todos-btn {
  background: transparent;
  color: var(--primary);
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.manage-todos-btn:active {
  opacity: 0.7;
}

.todo-date-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
}

.date-nav-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--pill-bg);
  border-radius: 50%;
  font-size: 18px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.date-nav-btn:active {
  background: var(--primary-light);
  color: var(--primary);
}

/* 全部待办列表 */
.all-todo-item {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.all-todo-icon {
  font-size: 24px;
  margin-right: 12px;
}

.all-todo-info {
  flex: 1;
}

.all-todo-title {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 2px;
}

.all-todo-freq {
  font-size: 12px;
  color: var(--text-muted);
}

.all-todo-actions {
  display: flex;
  gap: 8px;
}

.all-todo-edit {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 13px;
  cursor: pointer;
}

.all-todo-delete {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 13px;
  cursor: pointer;
}

.all-todo-enable {
  background: transparent;
  color: #52c41a;
  border: 1px solid #52c41a;
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 13px;
  cursor: pointer;
}

.all-todo-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 12px;
}

.all-todo-tab {
  flex: 1;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.all-todo-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.all-todo-disabled-tag {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: normal;
}

.all-todo-edit:active,
.all-todo-delete:active {
  opacity: 0.7;
}

.todo-date {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  min-width: 120px;
  text-align: center;
  cursor: pointer;
}

.todo-header-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  text-align: center;
}

.manage-todos-btn,
.add-todo-btn {
  min-width: 70px;
}

.add-todo-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.add-todo-btn:active {
  opacity: 0.8;
  transform: scale(0.96);
}

/* 待办空状态 */
.todo-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.todo-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.6;
}

.todo-empty-text {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--text);
}

.todo-empty-hint {
  font-size: 13px;
}

/* 待办底部操作 */
.todo-actions {
  text-align: center;
  padding: 20px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  margin-bottom: 16px;
}

/* Tab切换 */
.tab-bar {
  display: flex;
  background: var(--bg);
  border-radius: 8px;
  padding: 4px;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-muted);
}

.tab-btn.active {
  background: white;
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 疫苗列表 */
.vaccine-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

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

.vaccine-item.upcoming {
  background: #fff5f5;
}

.vaccine-name {
  font-weight: 600;
  margin-bottom: 4px;
}

.vaccine-desc {
  font-size: 13px;
  margin-bottom: 4px;
}

.vaccine-schedule {
  font-size: 12px;
}

.vaccine-action {
  text-align: right;
  flex-shrink: 0;
  margin-left: 12px;
}

.vaccine-next {
  display: block;
  font-size: 12px;
  color: var(--primary);
  margin-bottom: 8px;
}

.btn.small {
  padding: 6px 12px;
  font-size: 12px;
}

/* 症状列表 */
.symptom-item {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

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

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

.symptom-name {
  font-weight: 500;
}

/* 免责声明 */
.disclaimer {
  margin-top: 24px;
  padding: 12px;
  background: #f5f5f5;
  border-radius: 8px;
  font-size: 12px;
  color: #999;
  text-align: center;
}

/* 模态框增强 */
.modal.show {
  display: flex !important;
}

/* 模板区域 */
.template-section {
  background: var(--bg);
  border-radius: 12px;
  padding: 16px;
  margin: -8px -8px 0 -8px;
}

.template-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  text-align: center;
}

.template-group {
  margin-bottom: 14px;
}

.template-group:last-child {
  margin-bottom: 0;
}

.template-group-name {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding-left: 4px;
}

/* 模板按钮网格 */
.template-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.template-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 8px;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.template-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-1px);
}

.template-btn:active {
  transform: translateY(0);
}

.template-btn.selected {
  border-color: var(--primary) !important;
  background: var(--primary-light) !important;
  box-shadow: 0 0 0 2px rgba(47, 125, 109, 0.2);
}

.template-icon {
  font-size: 28px;
  margin-bottom: 6px;
}

.template-title {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

.template-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 疫苗信息盒 */
.vaccine-info-box {
  background: var(--bg);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}

/* 弹窗 */
.modal {
  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: 1000;
}

.modal-content {
  background: var(--card-bg);
  border-radius: 16px;
  width: 90%;
  max-width: 360px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  min-height: 0;
}

.modal-body .section-title {
  font-size: 15px;
  font-weight: 600;
}

.member-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

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

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

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

.member-phone {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}

.edit-btn {
  padding: 4px 12px;
  font-size: 12px;
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 4px;
  cursor: pointer;
}

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

/* 修改成员弹窗 */
.alert-box {
  background: #fff3cd;
  padding: 12px;
  border-radius: 6px;
  font-size: 13px;
  color: #856404;
  margin-bottom: 15px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #f8f8f8;
  border-radius: 6px;
  margin-bottom: 10px;
}

.info-label {
  font-size: 13px;
  color: var(--text-muted);
}

.info-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.member-badge {
  background: #f0f0f0;
  color: #666;
}

.member-avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  flex-shrink: 0;
}

.badge {
  font-size: 10px;
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 10px;
}

.add-member-section {
  padding: 16px;
  border-top: 1px solid var(--border);
  background: #fafafa;
}

.add-member-section .field {
  margin-bottom: 12px;
}

.add-member-section .secondary-btn {
  width: 100%;
}

.intro {
  margin-bottom: 16px;
}

.deleted-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

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

.deleted-main {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.deleted-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.deleted-icon {
  font-size: 18px;
  line-height: 1;
  flex: 0 0 auto;
}

.deleted-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
  min-width: 0;
}

.deleted-time {
  font-size: 12px;
  color: var(--text-muted);
  flex: 0 0 auto;
}

.deleted-desc {
  color: var(--text);
  font-size: 13px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deleted-meta {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.restore-btn {
  width: auto;
  flex: 0 0 auto;
  padding: 8px 16px;
  font-size: 13px;
  margin-top: 0;
  white-space: nowrap;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(43, 41, 37, 0.9);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 2000;
  animation: toastIn 0.3s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* 页面头部 */
.page-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.back-btn {
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--primary);
  cursor: pointer;
  padding: 4px 8px;
}

.page-title {
  font-size: 18px;
  font-weight: 700;
  margin-left: 8px;
}

/* 空状态 */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-emoji {
  font-size: 48px;
  margin-bottom: 12px;
}

/* 家庭列表项 */
.family-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}

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

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

.family-item.active .family-avatar {
  background: var(--primary);
  color: #fff;
}

.family-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
}

.family-info {
  flex: 1;
}

.family-name {
  font-weight: 700;
  margin-bottom: 2px;
}

.family-status {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--primary);
}

.family-item.active .family-status {
  background: var(--primary);
  color: #fff;
}

/* 工具类 */
.muted {
  color: var(--text-muted);
}

/* 记录类型网格 */
.record-type-grid {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.record-type-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  background: transparent;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.record-type-item:hover {
  background: var(--hover-bg);
}

.record-type-icon {
  font-size: 32px;
}

.record-type-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

/* 快速操作区域隐藏（改为通过记录页面添加） */
.quick-actions {
  display: none;
}

/* 档案表单 */
.profile-form {
  padding: 20px;
}

.profile-form .field {
  margin-bottom: 20px;
}

.profile-form .primary-btn {
  margin-top: 24px;
}

.gender-select {
  display: flex;
  gap: 16px;
}

.gender-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  flex: 1;
  justify-content: center;
}

.gender-option input {
  display: none;
}

.gender-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.gender-option span {
  font-size: 14px;
}

/* 日志页面 */
.log-header {
  display: flex;
  align-items: center;
  padding: 0;
}

.date-step {
  background: transparent;
  border: none;
  font-size: 28px;
  color: var(--primary);
  padding: 16px 20px;
  cursor: pointer;
}

.date-picker {
  flex: 1;
  text-align: center;
  padding: 12px;
  cursor: pointer;
}

.date-label {
  font-size: 16px;
  font-weight: 700;
}

.date-value {
  font-size: 13px;
  color: var(--text-muted);
}

.log-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0 8px;
}

.summary-hint {
  font-size: 12px;
  color: #999;
  margin-left: 8px;
}

.export-header {
  text-align: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
  display: none;
}

.export-header.visible {
  display: block;
}

.export-date {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.export-btn {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 13px;
  padding: 6px 12px;
  cursor: pointer;
}

/* ========== 记录搜索 ========== */
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 8px;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.icon-btn:hover {
  background: var(--bg-active);
  color: var(--primary);
}

/* 搜索栏 */
.record-search-bar {
  margin-bottom: 12px;
}

.record-search-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg);
  border: 1.5px solid var(--primary);
  border-radius: 999px;
  padding: 6px 14px;
}

.record-search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.record-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  outline: none;
  color: var(--text);
  min-width: 0;
}

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

/* 隐藏 type=search 原生 X 按钮，统一用"清空"文字 */
.record-search-input::-webkit-search-cancel-button,
.record-search-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.record-search-clear {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 0 6px;
  flex-shrink: 0;
  white-space: nowrap;
}

.record-search-clear:hover {
  color: var(--primary);
}

.record-search-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  flex-shrink: 0;
}

.record-search-close:hover {
  color: var(--danger);
}

.record-search-meta {
  font-size: 12px;
  color: var(--text-muted);
  padding: 6px 14px 0;
}

/* 搜索结果列表 */
.search-results-container {
  margin-bottom: 12px;
}

.search-result-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
}

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

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

.search-result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.search-result-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.search-result-date {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.search-result-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* 关键词高亮 */
.search-result-desc mark,
.search-result-head mark {
  background: rgba(47, 125, 109, 0.18);
  color: var(--primary);
  font-weight: 600;
  border-radius: 2px;
  padding: 0 1px;
}

.search-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.search-empty-emoji {
  font-size: 36px;
  margin-bottom: 8px;
}

/* 小结网格 */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 12px;
  gap: 8px;
}

.summary-card {
  text-align: center;
  padding: 10px 4px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}

.summary-card:active {
  background: var(--bg-active);
}

.summary-card.active {
  background: var(--primary);
  color: white;
}

.summary-card.active .summary-value {
  color: white;
}

.summary-card.active .summary-label {
  color: rgba(255, 255, 255, 0.9);
}

.summary-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.summary-label {
  font-size: 11px;
  color: var(--text-muted);
}

.log-list-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 16px 0 8px;
}

/* ========== 增长曲线 ========== */
.growth-tabs {
  display: flex;
  gap: 8px;
  padding: 6px;
  margin-bottom: 12px;
}

.growth-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 0;
  border-radius: 8px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  transition: all 0.18s ease;
}

.growth-tab.active {
  background: #FF6B6B;
  color: #FFFFFF;
  font-weight: 600;
}

.growth-chart {
  padding: 12px;
  margin-bottom: 12px;
}

.growth-range {
  padding: 10px 14px;
  margin-bottom: 8px;
}

.growth-range-label {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.growth-slider-wrap {
  position: relative;
  height: 32px;
  display: flex;
  align-items: center;
}

.growth-slider-track {
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: #E0E0E0;
  border-radius: 2px;
  z-index: 1;
}

.growth-slider-range {
  position: absolute;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
  z-index: 2;
}

.growth-slider {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  height: 32px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  pointer-events: none;
  z-index: 3;
}

.growth-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  pointer-events: auto;
  cursor: pointer;
}

.growth-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  pointer-events: auto;
  cursor: pointer;
}

.growth-slider::-webkit-slider-runnable-track {
  background: transparent;
}

.growth-slider::-moz-range-track {
  background: transparent;
}

.growth-slider-min {
  z-index: 4;
}

.growth-legend {
  display: flex;
  justify-content: space-around;
  margin-bottom: 8px;
  font-size: 12px;
  color: #666;
}

.growth-legend .lg::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.growth-legend .lg-p3::before { background: #52C41A; }
.growth-legend .lg-p50::before { background: #1890FF; }
.growth-legend .lg-p97::before { background: #FA8C16; }
.growth-legend .lg-baby::before { background: #FF6B6B; }

.growth-empty {
  padding: 40px 0;
  text-align: center;
  color: #999;
}

.growth-data-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 8px 0;
  border: 1px dashed var(--primary);
  background: transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.18s ease;
}

.growth-data-btn:active {
  background: var(--primary);
  color: #fff;
}

.growth-tip {
  text-align: center;
  font-size: 12px;
  margin-top: 8px;
}

.growth-note {
  padding: 14px 16px;
  margin-top: 12px;
}

.growth-note-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.growth-note-item {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.growth-note-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.growth-note-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  line-height: 1.5;
}

.growth-data {
  padding: 14px 16px;
  margin-top: 12px;
}

.growth-data-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.growth-data-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.growth-data-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-active);
  border-radius: 8px;
  font-size: 13px;
}

.growth-data-item .growth-data-date {
  color: var(--text);
  font-weight: 500;
}

.growth-data-item .growth-data-age {
  color: var(--text-muted);
  font-size: 12px;
}

.growth-data-item .growth-data-value {
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
}

.growth-data-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 16px 0;
}

/* ========== 数据管理 ========== */
.data-card {
  padding: 16px;
  margin-bottom: 12px;
}

.data-card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.data-card-desc {
  font-size: 13px;
  color: #666;
  margin-bottom: 12px;
  line-height: 1.5;
}

.data-card-actions {
  display: flex;
  gap: 8px;
}

.data-card-actions button {
  flex: 1;
}

/* ========== 报表 ========== */
.report-preview {
  border-top: 1px dashed var(--border);
  padding-top: 14px;
}

.report-preview-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.report-preview-actions button {
  flex: 1;
}

/* 报表正文（导出 PDF 时使用） */
.report-body {
  background: #fff;
  color: #333;
  font-size: 13px;
  line-height: 1.6;
  border-radius: 8px;
  overflow: hidden;
}

.report-header {
  background: linear-gradient(135deg, #FF6B6B, #FF8E53);
  color: #fff;
  padding: 18px 16px;
}

.report-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.report-header .report-meta {
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.9;
}

.report-section {
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
}

.report-section:last-child {
  border-bottom: none;
}

.report-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  margin-bottom: 10px;
}

.report-section-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 14px;
  background: #FF6B6B;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: -2px;
}

.report-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.report-stat {
  background: #f7f7f7;
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
}

.report-stat .stat-value {
  font-size: 18px;
  font-weight: 700;
  color: #FF6B6B;
}

/* ========== ActionSheet（推迟待办） ========== */
.action-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.18s ease-out;
}

.action-sheet-overlay.show {
  opacity: 1;
}

.action-sheet {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 8px 0 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.22s ease-out;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
}

.action-sheet-overlay.show .action-sheet {
  transform: translateY(0);
}

.action-sheet-title {
  text-align: center;
  font-size: 14px;
  color: #888;
  padding: 12px 16px 8px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 6px;
}

.action-sheet-btn {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  padding: 16px 20px;
  font-size: 16px;
  color: #222;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s;
}

.action-sheet-btn:hover,
.action-sheet-btn:active {
  background: #f5f5f5;
}

.action-sheet-icon {
  vertical-align: middle;
  margin-right: 8px;
  flex-shrink: 0;
}

.action-sheet-btn {
  display: flex;
  align-items: center;
}

.action-sheet-btn.cancel {
  margin-top: 8px;
  border-top: 1px solid #f0f0f0;
  text-align: center;
  color: #888;
  font-size: 15px;
}

.action-sheet-btn.danger {
  color: #E74C3C;
}

.action-sheet-btn.danger:hover,
.action-sheet-btn.danger:active {
  background: rgba(231, 76, 60, 0.08);
}

/* ========== 危险操作文字按钮（编辑待办弹窗内） ========== */
.danger-text-btn {
  width: 100%;
  background: transparent;
  border: none;
  color: #E74C3C;
  font-size: 15px;
  padding: 12px 16px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s;
}

.danger-text-btn:hover,
.danger-text-btn:active {
  background: rgba(231, 76, 60, 0.08);
}

/* ========== 编辑待办计划弹窗优化 ========== */
.edit-todo-modal {
  max-width: 380px;
}

.edit-todo-modal .modal-header {
  padding: 18px 20px 14px;
  border-bottom: none;
}

.edit-todo-modal .modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.edit-todo-modal .modal-body {
  padding: 4px 20px 8px;
}

/* 分区容器 */
.edit-section {
  margin-bottom: 18px;
}

.edit-section:last-child {
  margin-bottom: 8px;
}

.edit-section-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* 待办名称展示卡 */
.edit-todo-name-display {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-active);
  border-radius: 10px;
  padding: 12px 14px;
}

.edit-todo-icon {
  font-size: 22px;
  line-height: 1;
}

.edit-todo-name-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

/* 详情展示 */
.edit-todo-detail {
  font-size: 14px;
  color: var(--text);
  background: var(--bg-active);
  border-radius: 10px;
  padding: 10px 14px;
  line-height: 1.5;
}

/* 频率 pill 间距优化 */
.edit-todo-modal .pill-row {
  gap: 8px;
}

.edit-todo-modal .pill {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  font-size: 14px;
}

/* 底部保存按钮区 */
.edit-todo-footer {
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border);
  background: var(--card-bg);
}

.edit-todo-footer .primary-btn {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
}

/* ========== 待办行右侧三点按钮 ========== */
.todo-more {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 16px;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s, color 0.12s;
  margin-left: 2px;
}

.todo-more:hover,
.todo-more:active {
  background: rgba(0, 0, 0, 0.05);
  color: #555;
}

.report-stat .stat-label {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.report-table th {
  background: #fafafa;
  color: #666;
  font-weight: 600;
  padding: 7px 8px;
  text-align: left;
  border-bottom: 1px solid #eee;
  white-space: nowrap;
}

.report-table td {
  padding: 7px 8px;
  border-bottom: 1px solid #f5f5f5;
  color: #444;
}

.report-table tr:last-child td {
  border-bottom: none;
}

.report-note {
  font-size: 11px;
  color: #aaa;
  text-align: center;
  padding: 10px;
}

.report-health-tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: #fff1f0;
  color: #cf1322;
}

/* ========== 回收站：关键记录警告 + 永久删除按钮 ========== */
.deleted-warning {
  margin-top: 8px;
  padding: 6px 10px;
  background: #FFF7E6;
  color: #D46B08;
  border-radius: 6px;
  font-size: 12px;
  border: 1px solid #FFD591;
}

.delete-forever-btn {
  background: #FFF1F0 !important;
  color: #FF4D4F !important;
  border-color: #FFA39E !important;
  margin-left: 6px;
  padding: 8px 16px;
  font-size: 13px;
  width: auto;
  flex: 0 0 auto;
  margin-top: 0;
  white-space: nowrap;
}

.delete-forever-btn:active {
  background: #FF4D4F !important;
  color: #FFFFFF !important;
}

.deleted-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
  align-items: center;
}

/* ========== 记录页：搜索 + 分组 ========== */
.record-search {
  margin-bottom: 12px;
  padding: 8px 12px;
}

.record-search .input {
  border: none;
  background: #F5F5F5;
  padding: 8px 12px;
  border-radius: 8px;
}

.record-group {
  margin-bottom: 16px;
}

.record-group-title {
  font-size: 13px;
  color: #888;
  margin: 8px 4px;
  font-weight: 500;
}

/* ========== 症状详情：警示信号 + 立即就医 + 免责 ========== */
.symptom-warning {
  background: #FFF1F0;
  border: 1px solid #FFA39E;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 12px 0;
}

.symptom-warning-title {
  color: #CF1322;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}

.symptom-warning-list {
  margin: 0;
  padding-left: 20px;
  color: #CF1322;
  font-size: 13px;
  line-height: 1.6;
}

.seek-care-btn {
  width: 100%;
  background: linear-gradient(135deg, #FF4D4F, #CF1322) !important;
  border: none !important;
  margin-top: 16px;
  font-weight: 600;
}

.disclaimer {
  margin-top: 16px;
  padding: 10px 12px;
  background: #FFFBE6;
  border: 1px solid #FFE58F;
  border-radius: 6px;
  font-size: 12px;
  color: #874D00;
  line-height: 1.5;
  text-align: center;
}

/* ========== 疫苗多剂次选择列表 ========== */
.vaccine-dose-list {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 8px;
}

.vaccine-dose-item {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}

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

.vaccine-dose-item:hover {
  background: var(--hover-bg);
}

.vaccine-dose-check {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.vaccine-dose-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  flex: 1;
}

.vaccine-dose-date {
  font-size: 13px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.batch-add-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.batch-add-btn:hover {
  background: var(--primary-hover);
}

/* ========== 自定义疫苗页面美化 ========== */
.custom-vaccine-empty {
  text-align: center;
  padding: 48px 24px;
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px dashed var(--border);
}

.custom-vaccine-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.custom-vaccine-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.custom-vaccine-empty-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 260px;
  margin-left: auto;
  margin-right: auto;
}

.custom-vaccine-footer {
  text-align: center;
  padding: 16px 0 8px;
}

/* ========== 快速操作悬浮按钮（FAB） ========== */
.fab-container {
  position: fixed;
  right: 16px;
  bottom: 80px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  /* 由 JS 控制位置：通过 transform 偏移 */
}

.fab-btn {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18), 0 1px 3px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none; /* 拖动时阻止滚动 */
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
  overflow: hidden;
  padding: 0;
}

.fab-btn:active {
  transform: scale(0.94);
}

.fab-btn .fab-icon {
  font-size: 22px;
  line-height: 1;
}

.fab-btn .fab-label {
  font-size: 10px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: 0.5px;
  opacity: 0.95;
  white-space: nowrap;
  max-width: 52px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 进行中状态：高亮 + 脉冲 */
.fab-btn.active {
  background: var(--danger);
  box-shadow: 0 4px 14px rgba(179, 74, 62, 0.45), 0 0 0 0 rgba(179, 74, 62, 0.5);
  animation: fab-pulse 1.8s ease-out infinite;
}

@keyframes fab-pulse {
  0%   { box-shadow: 0 4px 14px rgba(179, 74, 62, 0.45), 0 0 0 0 rgba(179, 74, 62, 0.45); }
  70%  { box-shadow: 0 4px 14px rgba(179, 74, 62, 0.45), 0 0 0 14px rgba(179, 74, 62, 0); }
  100% { box-shadow: 0 4px 14px rgba(179, 74, 62, 0.45), 0 0 0 0 rgba(179, 74, 62, 0); }
}

/* 拖动中 */
.fab-btn.dragging {
  opacity: 0.85;
  transform: scale(1.08);
  cursor: grabbing;
  animation: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

/* 长按提示气泡 */
.fab-btn .fab-hint {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.fab-btn.show-hint .fab-hint {
  opacity: 1;
}

/* 小屏适配 */
@media (max-width: 359px) {
  .fab-btn {
    width: 48px;
    height: 48px;
  }
  .fab-btn .fab-icon { font-size: 18px; }
  .fab-btn .fab-label { font-size: 9px; max-width: 44px; }
  .fab-container { gap: 10px; }
}

/* ========== 设置页 FAB 开关 ========== */
.fab-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
}

.fab-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.fab-switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #d8d2c8;
  border-radius: 26px;
  transition: background 0.2s ease;
}

.fab-switch-slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.fab-switch input:checked + .fab-switch-slider {
  background: var(--primary);
}

.fab-switch input:checked + .fab-switch-slider::before {
  transform: translateX(18px);
}