/* ============================================
   满满的成长日记 - 全局样式
   ============================================ */

/* ---------- CSS 变量 ---------- */
:root {
  --primary: #FF7B9C;
  --primary-light: #FFB6C1;
  --primary-dark: #E85D80;
  --primary-bg: #FFF0F3;
  --secondary: #FFB347;
  --secondary-light: #FFD89B;
  --secondary-bg: #FFF8EC;
  --accent: #6EC5E9;
  --accent-bg: #E8F6FC;
  --success: #7FB069;
  --success-bg: #EFF6EA;
  --danger: #E76F51;
  --danger-bg: #FDEEE9;

  --bg-main: #FFF9F5;
  --bg-card: #FFFFFF;
  --bg-hover: #FFF5F0;

  --text-primary: #4A3728;
  --text-secondary: #8B7355;
  --text-light: #B8A99A;
  --text-white: #FFFFFF;

  --border: #F0E0D8;
  --border-light: #F8F0EB;
  --shadow: 0 2px 16px rgba(255, 123, 156, 0.08);
  --shadow-md: 0 4px 24px rgba(74, 55, 40, 0.08);
  --shadow-lg: 0 8px 32px rgba(74, 55, 40, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;

  --font-body: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-head: 'Noto Serif SC', 'Noto Sans SC', serif;
  --max-width: 1200px;
}

/* ---------- 重置 ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; cursor: pointer; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }
ul, ol { list-style: none; }

/* ---------- 导航栏 ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  transition: box-shadow 0.3s;
}

.navbar-scrolled {
  box-shadow: var(--shadow);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

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

.logo-text {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-menu {
  display: flex;
  gap: 4px;
  align-items: center;
}

.nav-menu a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.nav-menu a:hover {
  background: var(--primary-bg);
  color: var(--primary);
}

.nav-menu a.active {
  background: var(--primary);
  color: var(--text-white);
}

.nav-icon { font-size: 16px; }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ---------- 主内容 ---------- */
.main-content {
  flex: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px;
}

.page { animation: fadeInUp 0.4s ease; }

/* ---------- 页面头部 ---------- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-header h2 {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
}

.page-desc {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 4px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-white);
  box-shadow: 0 4px 12px rgba(255, 123, 156, 0.3);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 123, 156, 0.4);
}

.btn-outline {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

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

.btn-danger:hover {
  filter: brightness(0.95);
}

.btn-danger-outline {
  background: var(--bg-card);
  color: var(--danger);
  border: 1px solid var(--danger);
}

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

.link-btn {
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
  padding: 4px 8px;
  transition: opacity 0.2s;
}

.link-btn:hover { opacity: 0.7; }

.btn-icon {
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 16px;
  transition: background 0.2s;
}

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

/* ---------- 首页 ---------- */
.hero-banner {
  position: relative;
  background: linear-gradient(135deg, #FFF0F3 0%, #FFE8D6 50%, #FFF8EC 100%);
  border-radius: var(--radius-lg);
  padding: 40px;
  overflow: hidden;
  margin-bottom: 32px;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.hero-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #FFFFFF;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
  background: var(--primary-bg);
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-avatar.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

.hero-text h1 {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 4px 0 16px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-head);
}

.stat-label {
  font-size: 12px;
  color: var(--text-light);
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

.hero-decoration {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.deco-cloud {
  position: absolute;
  font-size: 40px;
  opacity: 0.5;
  animation: float 6s ease-in-out infinite;
}

.deco-1 { top: 20px; right: 40px; }
.deco-2 { top: 60px; right: 120px; font-size: 24px; animation-delay: 1s; }
.deco-3 { bottom: 20px; right: 200px; font-size: 32px; animation-delay: 2s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* 快捷操作 */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all 0.2s;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.quick-btn:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  color: var(--primary);
}

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

/* 首页分区 */
.home-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.home-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

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

.section-header h2 {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 600;
}

/* 时间线 */
.timeline {
  position: relative;
  padding-left: 8px;
}

.timeline-item {
  position: relative;
  padding-left: 28px;
  padding-bottom: 20px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 16px;
  bottom: 0;
  width: 2px;
  background: var(--border-light);
}

.timeline-item:last-child::before { display: none; }

.timeline-dot {
  position: absolute;
  left: 0;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid var(--bg-card);
  box-shadow: 0 0 0 2px var(--border);
}

.timeline-card {
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

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

.timeline-type {
  font-size: 12px;
  color: var(--primary);
  font-weight: 500;
}

.timeline-date {
  font-size: 12px;
  color: var(--text-light);
}

.timeline-card h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.timeline-card p {
  font-size: 13px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.timeline-img {
  width: 100%;
  max-height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 8px;
}

/* 迷你照片网格 */
.photo-grid-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.photo-thumb {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}

.photo-thumb:hover img { transform: scale(1.05); }

/* ---------- 空状态 ---------- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
}

.empty-state.large { padding: 80px 20px; }

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

.empty-state p {
  color: var(--text-light);
  margin-bottom: 16px;
}

/* ---------- 成长曲线 ---------- */
.growth-overview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.overview-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
}

.overview-icon { font-size: 32px; }

.overview-label {
  display: block;
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 4px;
}

.overview-value {
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-head);
  color: var(--text-primary);
}

.overview-value.small { font-size: 16px; }

.overview-value small {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-light);
}

.chart-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.chart-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.chart-card h3 {
  font-family: var(--font-head);
  font-size: 16px;
  margin-bottom: 16px;
}

/* 数据表格 */
.data-table {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 8px;
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.data-table table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
  border-bottom: 2px solid var(--border-light);
}

.data-table td {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-light);
}

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

.data-table tr:hover td { background: var(--bg-hover); }

/* ---------- 相册 ---------- */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.album-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.album-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.album-photo {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
}

.album-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.album-item:hover .album-photo img { transform: scale(1.05); }

.album-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 60%, rgba(0,0,0,0.5));
  display: flex;
  align-items: flex-end;
  padding: 12px;
  opacity: 0;
  transition: opacity 0.2s;
}

.album-item:hover .album-overlay { opacity: 1; }

.album-overlay span {
  color: white;
  font-size: 13px;
  font-weight: 500;
}

.album-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
}

.album-caption p {
  font-size: 14px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 里程碑 ---------- */
.milestone-groups {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.milestone-group {}

.group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-light);
}

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

.group-header h3 {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 600;
}

.group-count {
  font-size: 13px;
  color: var(--text-light);
  background: var(--primary-bg);
  padding: 4px 12px;
  border-radius: 20px;
}

.milestone-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

.milestone-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 16px;
  transition: transform 0.2s;
}

.milestone-card:hover { transform: translateY(-2px); }

.milestone-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.milestone-body { flex: 1; }

.milestone-body h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.milestone-body p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.milestone-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-light);
}

.milestone-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ---------- 日记 ---------- */
.diary-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.diary-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 24px;
  transition: transform 0.2s;
}

.diary-card:hover { transform: translateY(-2px); }

.diary-date-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 12px;
  background: var(--primary-bg);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.diary-day {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-head);
  color: var(--primary);
  line-height: 1;
}

.diary-month {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.diary-content { flex: 1; }

.diary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.diary-header h3 {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 600;
}

.diary-tags {
  display: flex;
  gap: 8px;
}

.tag {
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 20px;
  background: var(--secondary-bg);
  color: var(--text-secondary);
}

.diary-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  white-space: pre-wrap;
  margin-bottom: 12px;
}

.diary-footer {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

/* ---------- 设置 ---------- */
.settings-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.settings-card h3 {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full { grid-column: 1 / -1; }

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-main);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 123, 156, 0.1);
}

.form-group textarea { resize: vertical; }

.avatar-upload {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-preview.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: var(--bg-hover);
}

.data-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.about-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.8;
}

/* ---------- 弹窗 ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(74, 55, 40, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}

.modal-sm { max-width: 400px; }
.modal-lg { max-width: 680px; }

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

.modal-header h3 {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  font-size: 28px;
  color: var(--text-light);
  line-height: 1;
  padding: 0 4px;
  transition: color 0.2s;
}

.modal-close:hover { color: var(--text-primary); }

.modal-body { padding: 24px; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
}

.confirm-text {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.8;
  text-align: center;
}

/* 照片查看器 */
.photo-viewer { z-index: 1100; }

.photo-viewer-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: slideUp 0.3s ease;
}

.photo-viewer-content img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: var(--radius);
  object-fit: contain;
}

.photo-close {
  position: absolute;
  top: -40px;
  right: 0;
  font-size: 32px;
  color: white;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.photo-info {
  color: white;
  text-align: center;
  margin-top: 12px;
}

.photo-date {
  font-size: 14px;
  opacity: 0.8;
}

.photo-caption {
  font-size: 16px;
  font-weight: 500;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: white;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  background: var(--success);
}

.toast.error { background: var(--danger); }
.toast.info { background: var(--accent); }

/* ---------- 页脚 ---------- */
.footer {
  margin-top: 64px;
  padding: 40px 24px 24px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.footer-logo {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.footer-text {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 12px;
}

.footer-icp {
  font-size: 13px;
  color: var(--text-light);
  transition: color 0.2s;
}

.footer-icp:hover { color: var(--primary); }

/* ---------- 导航栏远程状态 ---------- */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.remote-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
}

/* ---------- 登录页 ---------- */
.page-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
}

.login-container {
  width: 100%;
  max-width: 440px;
}

.login-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.login-hero {
  background: linear-gradient(135deg, var(--primary-bg), var(--secondary-bg));
  padding: 40px 32px 24px;
  text-align: center;
}

.login-logo {
  font-size: 56px;
  display: block;
  margin-bottom: 12px;
}

.login-hero h1 {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.login-hero p {
  font-size: 14px;
  color: var(--text-light);
}

.login-form {
  padding: 32px;
}

.btn-block {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
  padding: 12px;
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  font-size: 13px;
  padding: 8px;
}

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

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---------- 同步状态 ---------- */
.sync-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 12px;
  background: var(--accent-bg);
  border-radius: var(--radius-sm);
}

.sync-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sync-dot.connected {
  background: var(--success);
  box-shadow: 0 0 8px rgba(127, 176, 105, 0.4);
}

/* ---------- 动画 ---------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

.fade-enter-active, .fade-leave-active { transition: opacity 0.3s, transform 0.3s; }
.fade-enter-from { opacity: 0; transform: translateY(10px); }
.fade-leave-to { opacity: 0; transform: translateY(-10px); }

.toast-enter-active, .toast-leave-active { transition: opacity 0.3s, transform 0.3s; }
.toast-enter-from, .toast-leave-to { opacity: 0; transform: translateX(-50%) translateY(20px); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .home-sections { grid-template-columns: 1fr; }
  .growth-overview { grid-template-columns: repeat(2, 1fr); }
  .chart-container { grid-template-columns: 1fr; }
  .milestone-list { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-card);
    padding: 16px;
    gap: 4px;
    box-shadow: var(--shadow-md);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-menu a {
    width: 100%;
    padding: 12px 16px;
  }

  .menu-toggle { display: flex; }

  .main-content { padding: 20px 16px; }

  .hero-banner { padding: 24px 20px; }
  .hero-content { flex-direction: column; text-align: center; }
  .hero-stats { justify-content: center; flex-wrap: wrap; gap: 16px; }
  .hero-decoration { display: none; }

  .page-header { flex-direction: column; align-items: flex-start; }
  .page-header h2 { font-size: 22px; }

  .form-grid { grid-template-columns: 1fr; }

  .diary-card { flex-direction: column; gap: 16px; }
  .diary-date-block { flex-direction: row; gap: 8px; }

  .overview-card { padding: 16px; }
  .overview-value { font-size: 20px; }
}

@media (max-width: 480px) {
  .quick-actions { grid-template-columns: 1fr 1fr; }
  .growth-overview { grid-template-columns: 1fr; }
  .hero-stats { gap: 12px; }
  .stat-num { font-size: 20px; }
  .logo-text { font-size: 16px; }
}
