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

html, body {
  overscroll-behavior: none;
  -webkit-overflow-scrolling: auto;
}

/* ============================================
   弹窗打开时锁定 body 滚动
   ============================================ */
body.modal-open {
  overflow: hidden;
  height: 100vh;
}

/* 弹窗内容区域可滚动 */
.modal {
  overscroll-behavior: contain;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #e8eff9;
  min-height: 100vh;
  color: #222831;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, #4088f0 0%, #54c4f7 100%);
  border-radius: 18px;
  padding: 14px 20px;
  margin-bottom: 14px;
  box-shadow: 0 3px 14px rgba(64, 136, 240, 0.15);
}

.date-display {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  min-width: 200px;
}

.search-box {
  flex: 1;
  max-width: 420px;
  margin: 0 30px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: none;
  border-radius: 22px;
  background: rgba(255,255,255,0.32);
  color: #fff;
  font-size: 16px;   /* ← 第1处改动：14px → 16px */
  outline: none;
  transition: 0.25s ease;
}

.search-box input::placeholder {
  color: rgba(255,255,255,0.75);
}
.search-box input:focus {
  background: rgba(255,255,255,0.45);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.75);
  font-size: 14px;
}

.login-btn {
  padding: 8px 20px;
  border: none;
  border-radius: 20px;
  background: #ffffff;
  color: #4088f0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}
.login-btn:hover {
  background: #f0f7ff;
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(64,136,240,0.2);
}

.main-content {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 6px;
  height: calc(100vh - 120px);
  min-height: calc(100vh - 120px);
  align-items: stretch;
  overflow: visible;
}

.main-content > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
}

.calendar-panel {
  background: #f3f7fc;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  flex-shrink: 0;
}

.version-panel {
  background: #f3f7fc;
  border-radius: 18px;
  padding: 12px 26px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  display: flex;
  align-items: center;
  flex-grow: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.version-panel-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.version-panel-link {
  font-size: 13px;
  color: #4088f0;
  text-decoration: none;
}

.version-panel-text {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

.version-panel-loading {
  font-size: 13px;
  color: #64748b;
}

.version-tag {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.panel-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a202c;
}

.panel-add {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #4088f0;
  color: white;
  font-size: 19px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.25s ease;
  box-shadow: 0 3px 10px rgba(64,136,240,0.22);
}
.panel-add:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(64,136,240,0.3);
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.nav-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  color: #64748b;
  cursor: pointer;
  padding: 4px 14px;
  border-radius: 10px;
  transition: 0.2s ease;
}
.nav-btn:hover {
  background: rgba(64,136,240,0.08);
  color: #4088f0;
}
.current-month {
  font-size: 16px;
  font-weight: 700;
  color: #1a202c;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}
.weekday {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  padding: 7px 0;
}
.weekday.sunday { color: #e06c6c; }
.weekday.saturday { color: #4088f0; }

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.day-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.22s ease;
  position: relative;
}
.day-cell:hover {
  background: rgba(64,136,240,0.09);
}
.day-cell.other-month { color: #b0bccd; }

.day-cell.today {
  background: #4088f0;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(64,136,240,0.25);
}
.day-cell.selected {
  background: rgba(64,136,240,0.12);
  border: 2px solid #4088f0;
}

/* ============================================
   日历日期标记点（内嵌 span，避免伪元素冲突）
   ============================================ */
.day-dot {
  position: absolute;
  bottom: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  z-index: 2;
}

.day-dot-memo {
  background: #e06c6c;
}

.day-dot-notify {
  background: #1890ff;
}

.day-dot-both {
  background: #e06c6c;
  box-shadow: 0 0 0 2px #1890ff;
}

.day-cell.sunday { color: #e06c6c; }
.day-cell.saturday { color: #4088f0; }

.memo-panel {
  background: #f3f7fc;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.memo-panel::-webkit-scrollbar {
  display: none;
}

.memo-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.memo-list::-webkit-scrollbar {
  display: none;
}

.memo-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 12px 16px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.03);
  cursor: pointer;
  transition: 0.2s ease;
  width: 100%;
}
.memo-card:hover {
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

/* 备忘录内容预览 - 默认收起 */
.memo-content-preview {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
  margin-top: 6px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
  max-height: 200px;
  opacity: 1;
  overflow-y: auto;
}
.memo-content-preview.collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

.memo-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 3px;
}
.memo-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a202c;
  line-height: 1.15;
}
.memo-add-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #dde2eb;
  background: #fff;
  color: #717e96;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease;
}
.memo-add-btn:hover {
  background: #4088f0;
  color: white;
  border-color: #4088f0;
}

.memo-date {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.15;
}
.fab {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4088f0, #54c4f7);
  color: white;
  border: none;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(64,136,240,0.28);
  transition: 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.fab:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 28px rgba(64,136,240,0.4);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: 0.25s ease;
  overscroll-behavior: none;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.modal {
  background: #ffffff;
  border-radius: 20px;
  padding: 24px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  transform: scale(0.93);
  transition: 0.25s ease;
  box-shadow: 0 10px 36px rgba(0,0,0,0.10);
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.modal::-webkit-scrollbar {
  display: none;
}
.modal-overlay.active .modal { transform: scale(1); }

.modal-login {
  max-width: 400px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.modal-title {
  font-size: 19px;
  font-weight: 700;
  color: #1a202c;
}
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #f0f4fb;
  color: #64748b;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease;
}
.modal-close:hover {
  background: #e06c6c;
  color: white;
}

.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 8px;
}
.form-input, .form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 16px;   /* ← 第2处改动：14px → 16px */
  outline: none;
  transition: 0.22s ease;
  font-family: inherit;
}
.form-input:focus, .form-textarea:focus {
  border-color: #4088f0;
  box-shadow: 0 0 0 4px rgba(64,136,240,0.1);
}
.form-textarea { min-height: 150px; resize: vertical; }

.form-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.form-actions-detail {
  margin-top: 14px;
}

.btn {
  padding: 10px 22px;
  border-radius: 12px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.22s ease;
}
.btn-primary {
  background: #4088f0;
  color: white;
  box-shadow: 0 3px 10px rgba(64,136,240,0.22);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(64,136,240,0.3);
}
.btn-secondary {
  background: #f0f4fb;
  color: #4a5568;
}
.btn-secondary:hover { background: #e2e8f0; }
.btn-danger {
  background: #e06c6c;
  color: white;
}
.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(224,108,108,0.22);
}

.btn-login {
  width: 100%;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.login-form { display: flex; flex-direction: column; gap: 6px; }
.login-input {
  padding: 12px 14px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 16px;   /* ← 第3处改动：14px → 16px */
  outline: none;
  transition: 0.22s ease;
}
.login-input:focus {
  border-color: #4088f0;
  box-shadow: 0 0 0 4px rgba(64,136,240,0.1);
}

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 14px 20px;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  transform: translateX(400px);
  transition: 0.35s ease;
  z-index: 2000;
}
.toast.show { transform: translateX(0); }
.toast.success { background: #42b983; }
.toast.error { background: #e06c6c; }

.empty-state {
  text-align: center;
  padding: 48px 16px;
  color: #b0bccd;
}
.empty-state-icon { font-size: 48px; margin-bottom: 14px; }
.empty-state-text { font-size: 16px; font-weight: 500; }

.memo-detail-content {
  font-size: 16px;
  line-height: 1.8;
  color: #1a202c;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.memo-detail-meta {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
  font-size: 13px;
  color: #8898aa;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 6px;
  color: white;
  font-size: 14px;
}
#authSection {
  display: flex;
  align-items: center;
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.logout-btn {
  padding: 5px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.4);
  background: transparent;
  color: white;
  font-size: 13px;
  cursor: pointer;
  transition: 0.2s ease;
}
.logout-btn:hover { background: rgba(255,255,255,0.15); }

.memo-loading {
  text-align: center;
  padding: 40px;
  color: #8898aa;
}

.month-picker-modal { max-width: 360px; }
.month-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px 0;
}
.month-item {
  padding: 16px;
  border-radius: 12px;
  background: #f0f4fb;
  color: #1a202c;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: 0.22s ease;
}
.month-item:hover {
  background: #4088f0;
  color: white;
  transform: scale(1.04);
}
.month-item.active {
  background: #4088f0;
  color: white;
}

.memo-notify-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #4088f0;
  background: rgba(64,136,240,0.1);
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 3px;
}

.memo-notify-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.4);
  background: transparent;
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease;
  flex-shrink: 0;
}

.memo-notify-btn:hover {
  background: rgba(255,255,255,0.15);
  transform: scale(1.05);
}
.memo-notify-btn:active {
  transform: scale(0.95);
}
.memo-notify-btn.testing {
  animation: pulse 1s infinite;
  opacity: 0.7;
}

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

.memo-repeat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #42b983;
  background: rgba(66, 185, 131, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 3px;
}

.repeat-section {
  border-top: 1px solid #e2e8f0;
  padding-top: 15px;
  margin-top: 10px;
}

#memoRepeatInterval {
  width: 100%;
}

.memo-detail-repeat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #42b983;
  margin-top: 6px;
}

/* ============================================
   自定义日期/时间选择器样式
   ============================================ */

.input-picker { position: relative; }
.input-picker-btn {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 10px; border: none;
  background: transparent; cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: 0.2s ease;
}
.input-picker-btn:hover { background: rgba(64,136,240,0.1); }

/* 居中弹出的选择器 - 相对于输入框容器居中，随页面滚动 */
.input-picker {
  position: relative;
}

.input-picker-popover.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
}

/* 日期选择器专用：更宽 */
.input-picker-popover.date-popover {
  min-width: 300px;
}

/* 时间选择器专用 */
.input-picker-popover.time-popover {
  min-width: 200px;
}

/* 时间列 */
.time-column {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  max-height: 200px; overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none;
  padding: 4px; border-radius: 12px; background: #f8fafc; width: 60px;
}
.time-column::-webkit-scrollbar { display: none; }
.time-column .time-item {
  width: 100%; text-align: center; padding: 7px 4px;
  border-radius: 10px; cursor: pointer; font-size: 14px;
  font-weight: 500; color: #4a5568; transition: 0.15s ease;
}
.time-column .time-item:hover { background: rgba(64,136,240,0.08); color: #4088f0; }
.time-column .time-item.selected {
  background: #4088f0; color: #fff; font-weight: 600;
  box-shadow: 0 2px 8px rgba(64,136,240,0.25);
}

/* 选择器底部按钮区 */
.popover-footer {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

/* 时间选择器中间冒号 */
.time-separator {
  font-size: 18px;
  font-weight: 700;
  color: #1a202c;
  display: flex;
  align-items: center;
}

/* 时间选择器行布局 */
.time-picker-row {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 12px;
}

/* 通知设置行 */
.notify-setting-row {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.notify-setting-row .input-picker {
  flex: 1;
}

/* 输入框右侧留出按钮空间 */
.input-picker input {
  padding-right: 40px;
}

/* 通知渠道选择 */
.notify-channel-select {
  margin-bottom: 8px;
}

/* 邮箱输入 */
.notify-email-input {
  display: none;
}

/* 重复间隔 */
.repeat-interval-wrap {
  display: none;
  margin-bottom: 8px;
}

/* 重复类型选择 */
.repeat-type-select {
  margin-bottom: 8px;
}

/* 详情通知 */
.detail-notify {
  display: none;
}

/* 删除按钮 */
.delete-btn {
  display: none;
}

/* 通知设置标签 */
.notify-setting-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 8px;
}

/* 日历导航（选择器内） */
.popover-calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

/* 平板手机适配 */
@media (max-width: 900px) {
  .main-content {
    grid-template-columns: 1fr;
    height: auto;
    min-height: auto;
    overflow: visible;
    display: block;
  }
  .main-content > div:first-child { display: block; height: auto; margin-bottom: 14px; }

  .calendar-panel { 
    width: 100%; 
    max-width: 100%; 
    height: auto;
    flex-shrink: unset;
    margin-bottom: 14px;
  }
  .memo-panel { 
    min-height: auto; 
    max-height: none; 
    width: 100%; 
    height: auto;
    overflow: visible;
    margin-top: 0;
  }
  .memo-list { 
    max-height: none; 
    overflow: visible;
  }
  .memo-card { width: 100%; min-width: 0; }

  .header { flex-wrap: wrap; gap: 12px; }
  .search-box {
    order: 3;
    max-width: 100%;
    margin: 0;
    flex-basis: 100%;
  }

  /* 移动端选择器适配 */
  .input-picker-popover {
    width: 90vw;
    max-width: 340px;
  }
}

/* app.js 迁移的内联样式 */
.login-prompt-btn {
  margin-top: 14px;
}

.memo-card-actions {
  display: flex;
}

.user-info-guest {
  gap: 4px;
}

.memo-notify-btn-disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ========== 主题切换按钮 ========== */
.theme-toggle-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.4);
  background: transparent;
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease;
  flex-shrink: 0;
}
.theme-toggle-btn:hover {
  background: rgba(255,255,255,0.15);
  transform: scale(1.05);
}

/* ========== 标签筛选栏 ========== */
.tag-filter-bar {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 16px;
  margin-bottom: 10px;
  background: #f3f7fc;
  border-radius: 12px;
  align-items: center;
}

.tag-filter-item {
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(64,136,240,0.1);
  color: #4088f0;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s ease;
  border: 1px solid transparent;
}
.tag-filter-item:hover {
  background: #4088f0;
  color: white;
}
.tag-filter-item.active {
  background: #4088f0;
  color: white;
  border-color: #4088f0;
}

.tag-filter-clear {
  padding: 4px 12px;
  border-radius: 20px;
  background: #e06c6c;
  color: white;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s ease;
}
.tag-filter-clear:hover {
  background: #c55555;
}

/* ========== 备忘录标签和置顶 ========== */
.memo-card.memo-pinned {
  border-left: 4px solid #4088f0;
}

.memo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.memo-tag {
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(64,136,240,0.1);
  color: #4088f0;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s ease;
}
.memo-tag:hover {
  background: #4088f0;
  color: white;
}

.memo-pinned-icon {
  margin-right: 4px;
}

.memo-pin-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #dde2eb;
  background: #fff;
  color: #717e96;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease;
  margin-right: 4px;
}
.memo-pin-btn:hover {
  background: #4088f0;
  color: white;
  border-color: #4088f0;
}

/* ========== 提醒设置折叠面板 ========== */
.notify-settings-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #f0f4fb;
  border-radius: 14px;
  cursor: pointer;
  transition: 0.2s ease;
  margin-bottom: 0;
  border: 2px solid transparent;
  user-select: none;
}
.notify-settings-toggle:hover {
  background: #e2e8f0;
  border-color: #4088f0;
}
.notify-settings-arrow {
  font-size: 12px;
  color: #64748b;
  transition: 0.2s ease;
  display: inline-block;
  width: 14px;
  text-align: center;
}
.notify-settings-label {
  font-size: 14px;
  font-weight: 600;
  color: #4a5568;
}
.notify-settings-content {
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
  max-height: 800px;
  opacity: 1;
  padding-top: 10px;
}
.notify-settings-content.collapsed {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  pointer-events: none;
}

/* ========== 表单内联（置顶复选框） ========== */
.form-group.form-group-inline {
  display: flex;
  align-items: center;
}
.form-group.form-group-inline .form-label {
  display: flex;
  align-items: center;
  margin-bottom: 0;
  cursor: pointer;
}

/* ========== 选择器定位修复 ========== */
.input-picker-popover {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  padding: 16px;
  z-index: 2001;
  opacity: 0;
  visibility: hidden;
  transition: 0.2s ease;
  min-width: 260px;
}
.input-picker-popover.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

/* ========== 暗黑主题 ========== */
body.dark-theme {
  background-color: #0f172a;
  color: #e2e8f0;
}

body.dark-theme .header {
  background: linear-gradient(90deg, #1e3a5f 0%, #2d5a87 100%);
}

body.dark-theme .calendar-panel,
body.dark-theme .memo-panel,
body.dark-theme .version-panel,
body.dark-theme .tag-filter-bar {
  background: #1e293b;
}

body.dark-theme .panel-title,
body.dark-theme .current-month,
body.dark-theme .modal-title {
  color: #e2e8f0;
}

body.dark-theme .weekday {
  color: #94a3b8;
}

body.dark-theme .day-cell {
  color: #e2e8f0;
}
body.dark-theme .day-cell.other-month {
  color: #475569;
}
body.dark-theme .day-cell:hover {
  background: rgba(64,136,240,0.15);
}

body.dark-theme .memo-card {
  background: #1e293b;
  box-shadow: 0 1px 6px rgba(0,0,0,0.2);
}
body.dark-theme .memo-card:hover {
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}
body.dark-theme .memo-title {
  color: #e2e8f0;
}
body.dark-theme .memo-date {
  color: #64748b;
}

body.dark-theme .modal {
  background: #1e293b;
}
body.dark-theme .modal-close {
  background: #334155;
  color: #94a3b8;
}
body.dark-theme .modal-close:hover {
  background: #e06c6c;
  color: white;
}

body.dark-theme .form-input,
body.dark-theme .form-textarea,
body.dark-theme .login-input {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}
body.dark-theme .form-input:focus,
body.dark-theme .form-textarea:focus,
body.dark-theme .login-input:focus {
  border-color: #4088f0;
  box-shadow: 0 0 0 4px rgba(64,136,240,0.15);
}
body.dark-theme .form-input::placeholder,
body.dark-theme .form-textarea::placeholder {
  color: #475569;
}

body.dark-theme .btn-secondary {
  background: #334155;
  color: #cbd5e1;
}
body.dark-theme .btn-secondary:hover {
  background: #475569;
}

body.dark-theme .memo-detail-content {
  color: #e2e8f0;
}
body.dark-theme .memo-detail-meta {
  border-top-color: #334155;
  color: #64748b;
}

body.dark-theme .empty-state,
body.dark-theme .memo-loading {
  color: #475569;
}

body.dark-theme .month-item {
  background: #334155;
  color: #e2e8f0;
}
body.dark-theme .month-item:hover {
  background: #4088f0;
  color: white;
}

body.dark-theme .nav-btn {
  color: #94a3b8;
}
body.dark-theme .nav-btn:hover {
  background: rgba(64,136,240,0.15);
  color: #4088f0;
}

body.dark-theme .memo-add-btn,
body.dark-theme .memo-pin-btn {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}
body.dark-theme .memo-add-btn:hover,
body.dark-theme .memo-pin-btn:hover {
  background: #4088f0;
  color: white;
  border-color: #4088f0;
}

body.dark-theme .memo-tag {
  background: rgba(64,136,240,0.15);
  color: #60a5fa;
}
body.dark-theme .memo-tag:hover {
  background: #4088f0;
  color: white;
}

body.dark-theme .tag-filter-bar {
  background: #1e293b;
}
body.dark-theme .tag-filter-item {
  background: rgba(64,136,240,0.15);
  color: #60a5fa;
}
body.dark-theme .tag-filter-item:hover,
body.dark-theme .tag-filter-item.active {
  background: #4088f0;
  color: white;
}

body.dark-theme .notify-settings-toggle {
  background: #334155;
}
body.dark-theme .notify-settings-toggle:hover {
  background: #475569;
}
body.dark-theme .notify-settings-label {
  color: #cbd5e1;
}
body.dark-theme .notify-settings-arrow {
  color: #94a3b8;
}

body.dark-theme .input-picker-popover {
  background: #1e293b;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}
body.dark-theme .time-column {
  background: #0f172a;
}
body.dark-theme .time-column .time-item {
  color: #cbd5e1;
}
body.dark-theme .time-column .time-item:hover {
  background: rgba(64,136,240,0.15);
  color: #60a5fa;
}

body.dark-theme .popover-footer {
  border-top-color: #334155;
}

body.dark-theme .version-panel-text,
body.dark-theme .version-panel-loading {
  color: #64748b;
}

body.dark-theme .memo-notify-badge {
  background: rgba(64,136,240,0.15);
  color: #60a5fa;
}
body.dark-theme 

body.dark-theme .search-box input {
  background: rgba(255,255,255,0.1);
  color: #e2e8f0;
}
body.dark-theme .search-box input::placeholder {
  color: rgba(255,255,255,0.4);
}
body.dark-theme .search-box input:focus {
  background: rgba(255,255,255,0.15);
}

body.dark-theme .login-btn {
  background: #1e293b;
  color: #60a5fa;
}
body.dark-theme .login-btn:hover {
  background: #334155;
}

body.dark-theme .fab {
  background: linear-gradient(135deg, #1e3a5f, #2d5a87);
}

body.dark-theme .memo-card.memo-pinned {
  border-left-color: #60a5fa;
}

body.dark-theme .memo-notify-btn {
  border-color: rgba(255,255,255,0.3);
}
body.dark-theme .memo-notify-btn:hover {
  background: rgba(255,255,255,0.15);
}

body.dark-theme .theme-toggle-btn {
  border-color: rgba(255,255,255,0.3);
}
body.dark-theme .theme-toggle-btn:hover {
  background: rgba(255,255,255,0.1);
}

body.dark-theme .form-label,
body.dark-theme .notify-setting-label {
  color: #cbd5e1;
}

body.dark-theme .detail-notify {
  color: #60a5fa;
}

body.dark-theme 
body.dark-theme .user-avatar:hover {
  background: rgba(255,255,255,0.5);
}

/* ========== 头像悬停效果 ========== */
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: 0.2s ease;
}
.user-avatar:hover {
  background: rgba(255,255,255,0.5);
  transform: scale(1.1);
}

/* ========== 骨架屏 ========== */
.memo-card.skeleton {
  pointer-events: none;
}
.skeleton-title {
  height: 16px;
  width: 60%;
  background: linear-gradient(90deg, #e2e8f0 25%, #f0f4fb 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  border-radius: 8px;
  margin-bottom: 8px;
  animation: skeleton-loading 1.5s infinite;
}
.skeleton-line {
  height: 12px;
  width: 100%;
  background: linear-gradient(90deg, #e2e8f0 25%, #f0f4fb 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  border-radius: 6px;
  margin-bottom: 6px;
  animation: skeleton-loading 1.5s infinite;
}
.skeleton-line.short {
  width: 40%;
}
@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

body.dark-theme .skeleton-title,
body.dark-theme .skeleton-line {
  background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
  background-size: 200% 100%;
}
body.dark-theme .memo-content-preview {
  color: #94a3b8;
}



  
  .notify-config-content {
    padding: 14px 16px;
  }
  .notify-config-footer {
    padding: 12px 16px;
  }
}


}


}


}

/* ========== 通知设置弹窗 - 竖屏标签栏竖向 + 横屏标签栏横向 ========== */

.notify-config-modal {
  max-width: 720px;
  width: 92%;
  max-height: 85vh;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.notify-config-modal .modal-header {
  padding: 16px 20px;
  margin-bottom: 0;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

/* ===== 默认/竖屏：标签栏竖向在左侧，内容在右侧 ===== */
.notify-config-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* 竖屏：左侧标签栏 */
.notify-config-sidebar {
  width: 140px;
  flex-shrink: 0;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 8px 0;
}
.notify-config-sidebar::-webkit-scrollbar {
  display: none;
}



/* 竖屏：右侧内容区 */
.notify-config-main {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.notify-config-main::-webkit-scrollbar {
  display: none;
}

.notify-channel-panel {
  display: none;
}
.notify-channel-panel.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

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

/* 渠道头部：开关 + 名称 */
.notify-channel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e2e8f0;
}

.notify-channel-name {
  font-size: 15px;
  font-weight: 600;
  color: #1a202c;
}

/* 开关样式 - iOS 风格 */
.notify-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}
.notify-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.notify-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.3s;
  border-radius: 26px;
}
.notify-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.notify-switch input:checked + .notify-slider {
  background-color: #4088f0;
}
.notify-switch input:checked + .notify-slider:before {
  transform: translateX(20px);
}

/* 底部按钮区 */
.notify-config-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 20px;
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
  background: #f8fafc;
  border-radius: 0 0 20px 20px;
}

/* 测试按钮 */
.notify-test-channel-btn {
  margin-top: 10px;
  background: #42b983;
  color: white;
  box-shadow: 0 2px 8px rgba(66,185,131,0.2);
  padding: 10px 20px;
}
.notify-test-channel-btn:hover {
  background: #36a372;
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(66,185,131,0.3);
}

/* ========== 通知设置弹窗（移动端优先） ========== */
.notify-config-modal {
  max-width: 700px;
  width: 92%;
  max-height: 90vh;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
}

.notify-config-modal .modal-header {
  padding: 16px 20px;
  margin-bottom: 0;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.notify-config-modal .modal-header .modal-title {
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.notify-config-modal .modal-close {
  width: 36px;
  height: 36px;
  font-size: 20px;
}

/* ===== 标签栏 - 胶囊式圆角标签 ===== */
.notify-config-tabs {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex-shrink: 0;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.notify-config-tabs::-webkit-scrollbar {
  display: none;
}

.notify-tab {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 20px;
  border: 1px solid transparent;
  background: transparent;
}
.notify-tab:hover {
  color: #4088f0;
  background: rgba(64,136,240,0.06);
}
.notify-tab.active {
  color: #fff;
  background: #4088f0;
  border-color: #4088f0;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(64,136,240,0.25);
}

/* 内容区域 */
.notify-config-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.notify-config-content::-webkit-scrollbar {
  display: none;
}

.notify-channel-panel {
  display: none;
}
.notify-channel-panel.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

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

/* 启用开关行 */
.notify-toggle-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.notify-toggle-label {
  font-size: 16px;
  font-weight: 600;
  color: #1a202c;
}

/* 大圆角开关 */
.notify-toggle {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 30px;
  flex-shrink: 0;
}
.notify-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.notify-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.3s;
  border-radius: 30px;
}
.notify-toggle-slider:before {
  position: absolute;
  content: "";
  height: 24px;
  width: 24px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.notify-toggle input:checked + .notify-toggle-slider {
  background-color: #4088f0;
}
.notify-toggle input:checked + .notify-toggle-slider:before {
  transform: translateX(22px);
}

/* 表单样式优化 */
.notify-channel-panel .form-group {
  margin-bottom: 16px;
}
.notify-channel-panel .form-label {
  font-size: 14px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 8px;
  display: block;
}
.notify-channel-panel .form-input,
.notify-channel-panel .form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  outline: none;
  transition: 0.2s ease;
  background: #fff;
  color: #1a202c;
}
.notify-channel-panel .form-input:focus,
.notify-channel-panel .form-textarea:focus {
  border-color: #4088f0;
  box-shadow: 0 0 0 3px rgba(64,136,240,0.1);
}
.notify-channel-panel .form-input::placeholder {
  color: #a0aec0;
}
.notify-channel-panel select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* 测试按钮 */
.btn-test {
  background: #42b983;
  color: white;
  box-shadow: 0 2px 8px rgba(66,185,131,0.25);
  margin-top: 8px;
  width: 100%;
  padding: 12px;
  font-size: 15px;
  border-radius: 12px;
}
.btn-test:hover {
  background: #36a372;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(66,185,131,0.3);
}

/* 底部按钮区 */
.notify-config-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
  background: #f8fafc;
}
.notify-config-footer .btn {
  padding: 12px 24px;
  font-size: 15px;
  border-radius: 12px;
  min-width: 100px;
}
.notify-config-footer .btn-primary {
  background: #4088f0;
  color: white;
  box-shadow: 0 2px 8px rgba(64,136,240,0.25);
}
.notify-config-footer .btn-secondary {
  background: #e2e8f0;
  color: #4a5568;
}

/* ========== 暗黑主题 - 通知设置 ========== */
body.dark-theme .notify-config-modal .modal-header {
  border-bottom-color: #334155;
}
body.dark-theme .notify-config-tabs {
  background: #1e293b;
  border-bottom-color: #334155;
}
body.dark-theme .notify-tab {
  color: #94a3b8;
}
body.dark-theme .notify-tab:hover {
  color: #60a5fa;
  background: rgba(64,136,240,0.08);
}
body.dark-theme .notify-tab.active {
  color: #fff;
  background: #4088f0;
  border-color: #4088f0;
  box-shadow: 0 2px 8px rgba(64,136,240,0.3);
}
body.dark-theme .notify-toggle-row {
  border-bottom-color: #334155;
}
body.dark-theme .notify-toggle-label {
  color: #e2e8f0;
}
body.dark-theme .notify-toggle-slider {
  background-color: #475569;
}
body.dark-theme .notify-config-footer {
  border-top-color: #334155;
  background: #1e293b;
}
body.dark-theme .notify-config-modal {
  background: #1e293b;
}
body.dark-theme .notify-channel-panel .form-input,
body.dark-theme .notify-channel-panel .form-textarea {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}
body.dark-theme .notify-channel-panel .form-input:focus,
body.dark-theme .notify-channel-panel .form-textarea:focus {
  border-color: #4088f0;
  box-shadow: 0 0 0 3px rgba(64,136,240,0.15);
}
body.dark-theme .notify-channel-panel .form-label {
  color: #cbd5e1;
}
body.dark-theme .notify-config-footer .btn-secondary {
  background: #334155;
  color: #cbd5e1;
}

/* ========== 移动端通知设置适配 ========== */
@media (max-width: 600px) {
  .notify-config-modal {
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    border-radius: 20px 20px 0 0;
    margin-top: auto;
    margin-bottom: 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
  }

  .notify-config-modal .modal-header {
    padding: 14px 16px;
  }
  .notify-config-modal .modal-header .modal-title {
    font-size: 17px;
  }

  .notify-config-tabs {
    padding: 10px 12px;
    gap: 4px;
  }
  .notify-tab {
    padding: 6px 10px;
    font-size: 12px;
    gap: 3px;
    border-radius: 16px;
  }

  .notify-config-content {
    padding: 16px;
  }

  .notify-channel-panel .form-group {
    margin-bottom: 14px;
  }
  .notify-channel-panel .form-label {
    font-size: 13px;
  }
  .notify-channel-panel .form-input,
  .notify-channel-panel .form-textarea {
    padding: 10px 12px;
    font-size: 15px;
    border-radius: 10px;
  }

  .notify-toggle-row {
    margin-bottom: 16px;
    padding-bottom: 14px;
  }
  .notify-toggle-label {
    font-size: 15px;
  }

  .btn-test {
    padding: 10px;
    font-size: 14px;
  }

  .notify-config-footer {
    padding: 12px 16px;
    gap: 8px;
  }
  .notify-config-footer .btn {
    padding: 10px 18px;
    font-size: 14px;
    min-width: 80px;
    flex: 1;
  }
}

@media (max-width: 400px) {
  .notify-tab {
    padding: 5px 8px;
    font-size: 11px;
    gap: 2px;
    border-radius: 14px;
  }
}

@media (max-width: 400px) {
  .notify-tab {
    padding: 5px 6px;
    font-size: 10px;
    gap: 0px;
  }
  .notify-tab .emoji {
    font-size: 12px;
  }
}
