/* ============================================
   妈妈宝宝 · Mom & Baby Platform Styles
   Warm, pink/blush/teal color scheme
   ============================================ */

:root {
  --rose: #e83e8c;
  --rose-dark: #c2185b;
  --rose-light: #fce4ec;
  --rose-soft: #f8bbd0;
  --teal: #00897b;
  --teal-dark: #00695c;
  --teal-light: #e0f2f1;
  --teal-soft: #b2dfdb;
  --gold: #ffd700;
  --gold-light: #fff8e1;
  --bg: #faf5f0;
  --card: #ffffff;
  --text: #2d2d2d;
  --text-light: #888;
  --text-muted: #aaa;
  --border: #f0e8e0;
  --border-light: #f5f0eb;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.03);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.10);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --font: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --nav-height: 64px;
  --bottom-nav-height: 68px;
  --max-width: 800px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--rose-soft);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--rose);
}

/* App Shell */
.app-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-bottom: calc(var(--bottom-nav-height) + 20px);
  min-height: 100vh;
  position: relative;
}

/* Top Navigation */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  height: var(--nav-height);
  display: none;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.top-nav .nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--rose);
  text-decoration: none;
  letter-spacing: 1px;
}

.top-nav .nav-logo .logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--rose), var(--teal));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
}

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

.top-nav .nav-link {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
}

.top-nav .nav-link:hover,
.top-nav .nav-link.active {
  color: var(--rose);
  background: var(--rose-light);
}

.top-nav .nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Bottom Navigation (Mobile) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--card);
  border-top: 1px solid var(--border);
  display: flex;
  height: var(--bottom-nav-height);
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.bottom-nav .nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.65rem;
  font-weight: 500;
  transition: var(--transition);
  padding: 6px 0;
  position: relative;
}

.bottom-nav .nav-item .nav-icon {
  font-size: 1.35rem;
  line-height: 1;
  transition: var(--transition);
}

.bottom-nav .nav-item.active {
  color: var(--rose);
}

.bottom-nav .nav-item.active .nav-icon {
  transform: scale(1.1);
}

.bottom-nav .nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--rose);
  border-radius: 0 0 3px 3px;
  opacity: 0;
  transition: var(--transition);
}

.bottom-nav .nav-item.active::before {
  opacity: 1;
}

/* Page Container */
.page {
  padding: 0 16px;
  padding-top: 16px;
  animation: fadeSlideUp 0.35s ease-out;
  max-width: var(--max-width);
  margin: 0 auto;
}

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

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Cards */
.card {
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

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

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.card-body {
  line-height: 1.7;
}

/* Stat Cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

.stat-card:active {
  transform: scale(0.97);
}

.stat-card .stat-icon {
  font-size: 1.8rem;
  margin-bottom: 6px;
}

.stat-card .stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--rose);
  line-height: 1.2;
}

.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 4px;
}

.stat-card.teal .stat-value { color: var(--teal); }
.stat-card.gold .stat-value { color: var(--gold); --rose: #b8860b; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}

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

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background: linear-gradient(135deg, var(--rose), var(--rose-dark));
  color: white;
  box-shadow: 0 4px 14px rgba(232, 62, 140, 0.3);
}
.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(232, 62, 140, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--teal);
  color: white;
  box-shadow: 0 4px 14px rgba(0, 137, 123, 0.3);
}
.btn-secondary:hover {
  box-shadow: 0 6px 20px rgba(0, 137, 123, 0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--rose);
  border: 2px solid var(--rose);
}
.btn-outline:hover {
  background: var(--rose-light);
}

.btn-ghost {
  background: transparent;
  color: var(--text-light);
}
.btn-ghost:hover {
  background: var(--border-light);
  color: var(--text);
}

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

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font);
  background: var(--card);
  color: var(--text);
  transition: var(--transition);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px var(--rose-light);
}

.form-input.error, .form-select.error, .form-textarea.error {
  border-color: #e53935;
  box-shadow: 0 0 0 3px #ffebee;
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.6;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-error {
  font-size: 0.75rem;
  color: #e53935;
  margin-top: 4px;
}

/* Floating Labels */
.floating-group {
  position: relative;
  margin-bottom: 24px;
}

.floating-group .form-input,
.floating-group .form-select {
  padding-top: 18px;
  padding-bottom: 6px;
}

.floating-group .floating-label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: var(--transition);
  pointer-events: none;
  background: var(--card);
  padding: 0 4px;
}

.floating-group .form-input:focus ~ .floating-label,
.floating-group .form-input:not(:placeholder-shown) ~ .floating-label,
.floating-group .form-select:focus ~ .floating-label,
.floating-group .form-select:not([value=""]) ~ .floating-label {
  top: 2px;
  font-size: 0.7rem;
  color: var(--rose);
  transform: translateY(0);
}

.floating-group .form-input::placeholder {
  color: transparent;
}

/* Checkbox & Toggle */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  background: var(--card);
  user-select: none;
}

.checkbox-pill input[type="checkbox"] {
  display: none;
}

.checkbox-pill.active,
.checkbox-pill:has(input:checked) {
  border-color: var(--rose);
  background: var(--rose-light);
  color: var(--rose);
  font-weight: 500;
}

.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.toggle-switch input {
  display: none;
}

.toggle-slider {
  width: 44px;
  height: 24px;
  background: #ddd;
  border-radius: 12px;
  transition: var(--transition);
  position: relative;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--rose);
}

.toggle-switch input:checked + .toggle-slider::after {
  left: 22px;
}

.toggle-label {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* Emoji Picker */
.emoji-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.emoji-option {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  background: var(--border-light);
}

.emoji-option:hover {
  background: var(--rose-light);
  transform: scale(1.1);
}

.emoji-option.selected {
  border-color: var(--rose);
  background: var(--rose-light);
  transform: scale(1.15);
}

/* Tabs (Pill Navigation) */
.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px;
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: var(--border-light);
  border-radius: var(--radius-full);
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab-pill {
  flex-shrink: 0;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: transparent;
  font-family: var(--font);
  white-space: nowrap;
}

.tab-pill:hover {
  color: var(--text);
  background: rgba(255,255,255,0.5);
}

.tab-pill.active {
  background: var(--card);
  color: var(--rose);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* Category Pills */
.category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
  display: none;
}

.category-pill {
  flex-shrink: 0;
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  background: var(--border-light);
  color: var(--text-light);
  border: none;
  font-family: var(--font);
  white-space: nowrap;
}

.category-pill:hover {
  background: var(--rose-light);
  color: var(--rose);
}

.category-pill.active {
  background: var(--rose);
  color: white;
}

/* Loading Spinner */
.spinner-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  flex-direction: column;
  gap: 12px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--rose);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner-sm {
  width: 18px;
  height: 18px;
  border-width: 2px;
}

.spinner-text {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* Toast / Notification */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 90%;
  width: 360px;
  pointer-events: none;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: slideDown 0.3s ease-out;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-success {
  background: #e8f5e9;
  color: #2e7d32;
  border-left: 4px solid #4caf50;
}

.toast-error {
  background: #ffebee;
  color: #c62828;
  border-left: 4px solid #e53935;
}

.toast-info {
  background: #e3f2fd;
  color: #1565c0;
  border-left: 4px solid #42a5f5;
}

/* Avatar */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar-sm { width: 32px; height: 32px; font-size: 0.8rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.5rem; }

.avatar-rose { background: linear-gradient(135deg, var(--rose), var(--rose-dark)); }
.avatar-teal { background: linear-gradient(135deg, var(--teal), var(--teal-dark)); }
.avatar-gold { background: linear-gradient(135deg, #ffb300, #ff8f00); }

/* Welcome Section */
.welcome-section {
  background: linear-gradient(135deg, var(--rose-light), var(--teal-light));
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.welcome-section::before {
  content: '👶';
  position: absolute;
  right: -10px;
  bottom: -10px;
  font-size: 80px;
  opacity: 0.1;
}

.welcome-section h1 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}

.welcome-section p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 16px;
}

/* Quick Actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-light);
  text-decoration: none;
  color: var(--text);
}

.quick-action:active {
  transform: scale(0.95);
}

.quick-action .qa-icon {
  font-size: 1.6rem;
}

.quick-action .qa-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-light);
}

/* Pregnancy / Baby Info Bar */
.info-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  border: 1px solid var(--border-light);
}

.info-bar .info-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.info-bar .info-icon.pink { background: var(--rose-light); }
.info-bar .info-icon.teal-bg { background: var(--teal-light); }

.info-bar .info-content h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.info-bar .info-content p {
  font-size: 0.8rem;
  color: var(--text-light);
}

.info-bar .info-badge {
  margin-left: auto;
  background: var(--rose-light);
  color: var(--rose);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

/* Photo Grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.photo-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--border-light);
  cursor: pointer;
  transition: var(--transition);
}

.photo-item:hover {
  transform: scale(1.02);
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-item .photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  color: white;
  font-size: 0.75rem;
}

.photo-item .photo-week {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--rose);
  color: white;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
}

/* ==================== Lightbox ==================== */
.lightbox-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.92);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  animation: lbFadeIn 0.2s ease;
}
@keyframes lbFadeIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox-content {
  position: relative;
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: lbZoomIn 0.25s ease;
}
@keyframes lbZoomIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.lightbox-content img {
  max-width: 92vw;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}
.lightbox-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
}
.lightbox-week {
  background: var(--rose);
  color: #fff;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.8rem;
}
.lightbox-caption {
  font-weight: 500;
}
.lightbox-date {
  opacity: 0.6;
  font-size: 0.75rem;
}
.lightbox-close {
  position: fixed;
  top: 16px; right: 16px;
  background: rgba(255,255,255,0.15);
  color: #fff; border: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 28px;
  cursor: pointer;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  line-height: 1;
}
.lightbox-close:hover { background: rgba(255,255,255,0.3); }
.lightbox-nav {
  position: fixed; top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  color: #fff; border: none;
  width: 48px; height: 48px;
  border-radius: 50%;
  font-size: 32px;
  cursor: pointer;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
}
.lightbox-nav:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-50%) scale(1.1);
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* Form Section Headers */
.form-section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

/* Thread List */
.thread-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.thread-item {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-light);
  text-decoration: none;
  color: var(--text);
  display: block;
}

.thread-item:active {
  transform: scale(0.99);
  background: var(--border-light);
}

.thread-item .thread-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.thread-item .thread-category {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--rose-light);
  color: var(--rose);
  font-weight: 500;
}

.thread-item .thread-author {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.thread-item .thread-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: auto;
}

.thread-item .thread-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.4;
}

.thread-item .thread-excerpt {
  font-size: 0.8rem;
  color: var(--text-light);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.thread-item .thread-stats {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Thread List Images */
.thread-images {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  align-items: center;
}
.thread-img-wrap {
  width: 52px; height: 52px;
  border-radius: 8px; overflow: hidden;
  background: var(--border-light);
  flex-shrink: 0;
}
.thread-img-thumb {
  width: 100%; height: 100%;
  object-fit: cover;
}
.thread-img-more {
  width: 52px; height: 52px;
  border-radius: 8px;
  background: var(--border-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 600;
  color: var(--text-light);
  flex-shrink: 0;
}

/* Reply List */
.reply-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reply-item {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--border-light);
}

.reply-item .reply-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.reply-item .reply-author {
  font-size: 0.85rem;
  font-weight: 600;
}

.reply-item .reply-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: auto;
}

.reply-item .reply-content {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text);
}

/* Thread Detail */
.thread-detail-header {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 16px;
  border: 1px solid var(--border-light);
}

.thread-detail-header .td-category {
  font-size: 0.75rem;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  background: var(--rose-light);
  color: var(--rose);
  font-weight: 500;
  display: inline-block;
  margin-bottom: 8px;
}

.thread-detail-header .td-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
}

.thread-detail-header .td-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
}

.thread-detail-header .td-content {
  margin-top: 16px;
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
}

/* Back Button */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--text-light);
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  font-family: var(--font);
  margin-bottom: 12px;
}

.back-btn:hover {
  background: var(--border-light);
  color: var(--text);
}

/* Page Title */
.page-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.page-subtitle {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 20px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-light);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.empty-state h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.empty-state p {
  font-size: 0.85rem;
  margin-bottom: 20px;
}

/* Sort Bar */
.sort-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.sort-btn {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: none;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  color: var(--text-light);
  font-family: var(--font);
  transition: var(--transition);
}

.sort-btn.active {
  background: var(--rose);
  color: white;
}

/* Milestone List */
.milestone-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.milestone-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  transition: var(--transition);
  cursor: pointer;
}

.milestone-item:hover {
  border-color: var(--rose-soft);
}

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

.milestone-item .milestone-check.done {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}

.milestone-item .milestone-info {
  flex: 1;
}

.milestone-item .milestone-label {
  font-size: 0.9rem;
  font-weight: 500;
}

.milestone-item .milestone-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.milestone-item .milestone-age {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--teal-light);
  color: var(--teal);
  font-weight: 500;
}

/* Vaccine List */
.vaccine-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vaccine-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.vaccine-item .vaccine-icon {
  font-size: 1.5rem;
}

.vaccine-item .vaccine-info {
  flex: 1;
}

.vaccine-item .vaccine-name {
  font-size: 0.9rem;
  font-weight: 500;
}

.vaccine-item .vaccine-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.vaccine-item .vaccine-status {
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-weight: 500;
}

.vaccine-item .vaccine-status.done {
  background: var(--teal-light);
  color: var(--teal);
}

.vaccine-item .vaccine-status.pending {
  background: #fff3e0;
  color: #e65100;
}

/* FAB Button */
.fab {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + 20px);
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--rose-dark));
  color: white;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(232, 62, 140, 0.4);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  font-family: var(--font);
  line-height: 1;
}

.fab:active {
  transform: scale(0.9);
}

/* Auth Pages */
/* ============================================
   Auth Pages (Login / Register)
   Enhanced design with glassmorphism, decorative orbs, animated logo
   ============================================ */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: linear-gradient(170deg,
    #fce4ec 0%,
    #faf5f0 35%,
    #faf5f0 100%
  );
  position: relative;
  overflow: hidden;
}

/* Decorative floating orbs */
.auth-deco {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.auth-deco-1 {
  top: -80px;
  right: -60px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(232,62,140,0.10) 0%, transparent 70%);
  animation: authDecoFloat 8s ease-in-out infinite;
}

.auth-deco-2 {
  bottom: -40px;
  left: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(0,137,123,0.07) 0%, transparent 70%);
  animation: authDecoFloat 10s ease-in-out infinite reverse;
}

.auth-deco-3 {
  top: 40%;
  left: -80px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(255,215,0,0.06) 0%, transparent 70%);
  animation: authDecoFloat 12s ease-in-out infinite 1s;
}

@keyframes authDecoFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(15px, -15px) scale(1.05); }
  66% { transform: translate(-10px, 10px) scale(0.95); }
}

/* Center container */
.auth-container {
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 1;
}

/* Header section */
.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header .auth-logo {
  display: inline-flex;
  margin-bottom: 18px;
}

.auth-header .auth-logo-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--rose), var(--rose-dark));
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 8px 28px rgba(232,62,140,0.3);
  animation: authLogoBounce 3s ease-in-out infinite;
}

@keyframes authLogoBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.02); }
}

.auth-header h1 {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.auth-header p {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* Auth card - glassmorphism style */
.auth-card {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.06),
    0 2px 8px rgba(0,0,0,0.03);
  padding: 36px 28px 32px;
  border: 1px solid rgba(255,255,255,0.6);
  transition: var(--transition);
}

.auth-card:hover {
  box-shadow:
    0 12px 48px rgba(0,0,0,0.08),
    0 4px 12px rgba(0,0,0,0.04);
}

/* Auth error message */
.auth-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #fff0f0;
  border: 1px solid #ffcdd2;
  border-radius: var(--radius-sm);
  color: #c62828;
  font-size: 0.85rem;
  margin-bottom: 20px;
  animation: fadeSlideUp 0.3s ease-out;
}

/* Input prefix icons */
.floating-group .input-prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  z-index: 1;
  pointer-events: none;
  transition: var(--transition);
  opacity: 0.45;
}

.floating-group:focus-within .input-prefix,
.floating-group .form-input:not(:placeholder-shown) ~ .input-prefix {
  opacity: 1;
}

.floating-group .form-input {
  padding-left: 40px !important;
}

/* Auth floating-label offset for prefix icons */
.auth-card .floating-group .floating-label {
  left: 40px;
}

.auth-card .floating-group .form-input:focus ~ .floating-label,
.auth-card .floating-group .form-input:not(:placeholder-shown) ~ .floating-label {
  left: 16px;
}

/* Auth options (remember me) */
.auth-options {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 24px;
  margin-top: -4px;
}

.auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-light);
  user-select: none;
  position: relative;
}

.auth-remember input[type="checkbox"] {
  display: none;
}

.auth-checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
  position: relative;
  background: var(--card);
}

.auth-remember input:checked + .auth-checkmark {
  background: var(--rose);
  border-color: var(--rose);
}

.auth-remember input:checked + .auth-checkmark::after {
  content: '✓';
  color: white;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.auth-remember input:checked ~ span:last-child {
  color: var(--rose);
  font-weight: 500;
}

/* Auth footer */
.auth-footer {
  text-align: center;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
  font-size: 0.85rem;
  color: var(--text-light);
}

.auth-footer a {
  color: var(--rose);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
}

.auth-footer a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--rose);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.3s ease;
}

.auth-footer a:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

/* Mobile optimization */
@media (max-width: 420px) {
  .auth-page {
    padding: 20px 16px;
    align-items: flex-start;
    padding-top: 48px;
  }

  .auth-card {
    padding: 28px 20px 24px;
    border-radius: var(--radius-lg);
  }

  .auth-header .auth-logo-icon {
    width: 60px;
    height: 60px;
    font-size: 1.6rem;
    box-shadow: 0 6px 20px rgba(232,62,140,0.25);
  }

  .auth-header h1 {
    font-size: 1.35rem;
  }

  .auth-deco-1 {
    width: 200px;
    height: 200px;
    top: -60px;
    right: -40px;
  }

  .auth-deco-2 {
    width: 140px;
    height: 140px;
  }
}

/* Image Preview */
.image-preview {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--border-light);
  margin-bottom: 12px;
}

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

/* Modal / Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.modal-content {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: fadeSlideUp 0.3s ease-out;
}

.modal-content h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  text-align: center;
}

/* Profile */
.profile-header {
  text-align: center;
  padding: 32px 16px;
  background: linear-gradient(135deg, var(--rose-light), var(--teal-light));
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}

.profile-header .avatar {
  margin: 0 auto 12px;
}

.profile-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
}

.profile-header p {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* Notification Bell */
.notification-bell {
  position: relative;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
  font-size: 1.2rem;
}

.notification-bell:hover {
  background: var(--border-light);
}

.notification-bell .badge {
  position: absolute;
  top: 0;
  right: 0;
  width: 16px;
  height: 16px;
  background: var(--rose);
  border-radius: 50%;
  font-size: 0.6rem;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Chart container */
.chart-container {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--border-light);
}

.chart-container canvas {
  width: 100% !important;
  max-height: 250px;
}

/* Profile Row */
.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}

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

.profile-row .pr-label {
  font-size: 0.85rem;
  color: var(--text-light);
}

.profile-row .pr-value {
  font-size: 0.9rem;
  font-weight: 500;
  text-align: right;
}

/* Gender Selector */
.gender-selector {
  display: flex;
  gap: 16px;
}

.gender-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  font-size: 2rem;
}

.gender-option:hover {
  border-color: var(--rose-soft);
}

.gender-option.selected {
  border-color: var(--rose);
  background: var(--rose-light);
}

.gender-option .gender-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

/* Responsive Breakpoints */
@media (min-width: 768px) {
  .top-nav {
    display: flex;
  }

  .bottom-nav {
    display: none;
  }

  .app-shell {
    padding-top: calc(var(--nav-height) + 20px);
    padding-bottom: 40px;
    padding-left: 24px;
    padding-right: 24px;
  }

  .stat-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .photo-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .quick-actions {
    grid-template-columns: repeat(4, 1fr);
  }

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

  .page {
    padding-top: 0;
  }

  .fab {
    bottom: 40px;
    right: calc(50% - 400px + 40px);
  }
}

@media (max-width: 767px) {
  .top-nav {
    display: none !important;
  }

  .bottom-nav {
    display: flex;
  }

  .app-shell {
    padding-top: 12px;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 16px;
  }

  .page {
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: calc(var(--bottom-nav-height) + 28px);
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .quick-actions {
    grid-template-columns: repeat(3, 1fr);
  }

  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  /* Quick func grid on mobile: reduce columns to fit icons */
  .qa-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .qa-card { padding: 10px 2px; }
  .qa-card-icon { width: 32px; height: 32px; font-size: 1rem; }
  .qa-card-label { font-size: 0.6rem; }

  /* Today summary grid: 2 columns on mobile */
  .today-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .today-item { padding: 6px 4px; }
  .ti-icon { font-size: 1rem; }
  .ti-val { font-size: 0.8rem; }
  .ti-lbl { font-size: 0.55rem; }

  /* Stat cards: more compact on mobile */
  .stat-card-sm { padding: 10px 4px; }
  .s-icon { font-size: 1.1rem; }
  .s-value { font-size: 1rem; }
  .s-label { font-size: 0.6rem; }
}

/* Extra small screens: 2-column grid */
@media (max-width: 380px) {
  .qa-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .qa-card { padding: 10px 6px; }
  .qa-card-icon { width: 36px; height: 36px; font-size: 1.1rem; }
}

/* Transition Classes */
.fade-enter-active, .fade-leave-active {
  transition: opacity 0.3s ease;
}
.fade-enter-from, .fade-leave-to {
  opacity: 0;
}

.slide-fade-enter-active {
  transition: all 0.3s ease-out;
}
.slide-fade-leave-active {
  transition: all 0.2s ease-in;
}
.slide-fade-enter-from {
  transform: translateX(20px);
  opacity: 0;
}
.slide-fade-leave-to {
  transform: translateX(-20px);
  opacity: 0;
}

/* Utility */
.text-center { text-align: center; }
.text-rose { color: var(--rose); }
.text-teal { color: var(--teal); }
.text-muted { color: var(--text-muted); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }

/* ==================== Mall Styles ==================== */
.page-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 4px 0;
}

.product-card {
  background: var(--card-bg, #fff);
  border-radius: var(--radius, 12px);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.product-card:active {
  transform: scale(0.97);
}

.product-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: #f5f0f0;
  overflow: hidden;
}
.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--rose, #e8858c);
  background: linear-gradient(135deg, #fce4ec, #f8e0e7);
}

.product-info {
  padding: 10px 12px;
}
.product-cat-tag {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--rose, #e8858c);
  background: #fce4ec;
  padding: 2px 8px;
  border-radius: 20px;
  margin-bottom: 4px;
}
.product-name {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
  color: var(--text, #333);
}
.product-price-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.product-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--rose, #e74c3c);
}
.product-oprice {
  font-size: 0.75rem;
  color: var(--text-light, #999);
  text-decoration: line-through;
}
.product-stock {
  font-size: 0.7rem;
  color: var(--text-light, #999);
  margin-top: 2px;
}
.low-stock {
  color: var(--rose, #e74c3c);
  font-weight: 600;
}

/* Product Detail */
.product-detail {
  margin-top: 8px;
}
.pd-img-wrap {
  width: 100%;
  aspect-ratio: 1;
  background: #f5f0f0;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}
.pd-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pd-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  font-weight: 700;
  color: var(--rose, #e8858c);
  background: linear-gradient(135deg, #fce4ec, #f8e0e7);
}
.pd-body {
  padding: 0;
}
.pd-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 8px 0;
  color: var(--text, #333);
}
.pd-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.pd-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rose, #e74c3c);
}
.pd-oprice {
  font-size: 0.9rem;
  color: var(--text-light, #999);
  text-decoration: line-through;
}
.pd-stock {
  font-size: 0.85rem;
  color: var(--text-light, #999);
  margin-bottom: 12px;
}
.pd-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-light, #666);
  margin-bottom: 20px;
  white-space: pre-wrap;
}
.pd-actions {
  position: sticky;
  bottom: 0;
  background: var(--card-bg, #fff);
  padding: 12px 0;
}

/* Qty Selector */
.qty-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.qty-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border, #ddd);
  background: var(--card-bg, #fff);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text, #333);
}
.qty-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.qty-input {
  width: 50px;
  text-align: center;
  border: 1px solid var(--border, #ddd);
  border-radius: 8px;
  padding: 6px;
  font-size: 1rem;
}

/* Cart */
.cart-list {
  margin-top: 8px;
}
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card-bg, #fff);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.ci-info {
  flex: 1;
}
.ci-name {
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text, #333);
}
.ci-price {
  font-weight: 700;
  color: var(--rose, #e74c3c);
}
.ci-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ci-qty {
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}
.cart-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--card-bg, #fff);
  border-radius: 12px;
  margin-top: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.btn-outline-danger {
  border: 1px solid var(--rose, #e74c3c);
  color: var(--rose, #e74c3c);
  background: transparent;
}
.btn-outline-danger:active {
  background: var(--rose, #e74c3c);
  color: #fff;
}

/* Orders */
.order-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 12px;
  -webkit-overflow-scrolling: touch;
}
.order-status {
  font-weight: 600;
  font-size: 0.8rem;
}
.status-pending { color: #f59e0b; }
.status-paid { color: #10b981; }
.status-shipped { color: var(--teal, #2997ff); }
.status-delivered { color: #10b981; }
.status-cancelled { color: var(--text-light, #999); }

/* ==================== Admin Styles ==================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--card-bg, #fff);
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.stat-icon { font-size: 1.5rem; margin-bottom: 4px; }
.stat-num { font-size: 1.4rem; font-weight: 700; color: var(--teal, #2997ff); }
.stat-label { font-size: 0.75rem; color: var(--text-light, #999); margin-top: 2px; }

.admin-nav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.admin-nav-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--card-bg, #fff);
  border-radius: 12px;
  padding: 20px 12px;
  text-decoration: none;
  color: var(--text, #333);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.15s;
}
.admin-nav-card:active { transform: scale(0.95); }
.admin-nav-icon { font-size: 1.8rem; }

.admin-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  background: var(--card-bg, #fff);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.admin-table th {
  background: #f8f0f0;
  padding: 10px 8px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text, #333);
}
.admin-table td {
  padding: 8px;
  border-bottom: 1px solid var(--border, #eee);
  vertical-align: middle;
}
.admin-table tr:last-child td {
  border-bottom: none;
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-muted {
  background: #f3f4f6;
  color: #9ca3af;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.search-bar {
  margin-bottom: 12px;
}

.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s;
}
.modal-content {
  background: var(--card-bg, #fff);
  width: 100%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  border-radius: 16px 16px 0 0;
  padding: 24px 20px;
  animation: slideUp 0.25s;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.status-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: #f3f4f6;
}

/* ==================== Desktop Responsive ==================== */
@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .stats-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .admin-nav-grid {
    grid-template-columns: repeat(5, 1fr);
  }
  .modal-content {
    align-self: center;
    border-radius: 16px;
  }
  .modal-overlay {
    align-items: center;
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ==================== AI Chat Styles ==================== */
.ai-welcome {
  text-align: center;
  padding: 32px 16px;
}
.ai-welcome-icon { font-size: 4rem; margin-bottom: 12px; }
.ai-welcome h3 { font-size: 1.2rem; margin-bottom: 8px; color: var(--text, #333); }
.ai-welcome p { color: var(--text-light, #999); font-size: 0.9rem; margin-bottom: 16px; }
.ai-suggestions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ai-suggestion-chip {
  background: #fce4ec; color: var(--rose, #e8858c); border: none;
  border-radius: 20px; padding: 8px 16px; font-size: 0.85rem;
  cursor: pointer; transition: transform 0.15s;
}
.ai-suggestion-chip:active { transform: scale(0.95); }
.ai-chat-box {
  height: calc(100vh - 280px); overflow-y: auto; padding: 8px 0;
  display: flex; flex-direction: column; gap: 12px;
}
.ai-message { display: flex; gap: 8px; max-width: 85%; }
.ai-message.user { align-self: flex-end; flex-direction: row-reverse; }
.ai-avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; background: #f5f0f0; flex-shrink: 0; }
.ai-bubble {
  padding: 10px 14px; border-radius: 14px; font-size: 0.88rem; line-height: 1.6;
  background: #f5f0f0; color: var(--text, #333);
}
.ai-message.user .ai-bubble { background: var(--rose, #e8858c); color: #fff; }
.ai-bubble strong { font-weight: 700; }
.ai-bubble blockquote { border-left: 3px solid var(--rose); padding-left: 10px; margin: 6px 0; color: var(--text-light); font-size: 0.83rem; }
.ai-bubble h4 { margin: 8px 0 4px; font-size: 0.95rem; }
.ai-typing { min-width: 60px; display: flex; align-items: center; justify-content: center; }
.dot-pulse { width: 8px; height: 8px; background: var(--text-light); border-radius: 50%; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
.ai-input-bar {
  display: flex; gap: 8px; position: sticky; bottom: 0; padding: 12px 0;
  background: var(--card-bg, #fff);
}
.ai-input {
  flex: 1; border: 1px solid var(--border, #ddd); border-radius: 24px;
  padding: 10px 16px; font-size: 0.9rem; outline: none;
}
.ai-input:focus { border-color: var(--rose, #e8858c); }
.ai-send-btn {
  background: var(--rose, #e8858c); color: #fff; border: none;
  border-radius: 24px; padding: 10px 20px; font-weight: 600; cursor: pointer;
}
.ai-send-btn:disabled { opacity: 0.5; }

/* ==================== Knowledge Base Styles ==================== */
.article-card { cursor: pointer; transition: transform 0.1s; margin-bottom: 8px; }
.article-card:active { transform: scale(0.98); }
.article-cat-tag {
  display: inline-block; font-size: 0.7rem; background: #fce4ec;
  color: var(--rose); padding: 2px 8px; border-radius: 20px; margin-bottom: 6px;
}
.article-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; color: var(--text, #333); }
.article-summary { font-size: 0.82rem; color: var(--text-light, #999); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-meta { display: flex; gap: 12px; font-size: 0.75rem; color: var(--text-light, #999); margin-top: 8px; }

.kd-header { margin-bottom: 16px; }
.kd-title { font-size: 1.3rem; font-weight: 700; margin: 8px 0; line-height: 1.3; color: var(--text, #333); }
.kd-meta { font-size: 0.8rem; color: var(--text-light, #999); display: flex; gap: 12px; }
.kd-content {
  font-size: 0.9rem; line-height: 1.8; color: var(--text, #333);
}
.kd-content h2 { font-size: 1.15rem; margin: 20px 0 10px; color: var(--rose); }
.kd-content h3 { font-size: 1.05rem; margin: 16px 0 8px; }
.kd-content ul { padding-left: 20px; margin: 8px 0; }
.kd-content li { margin-bottom: 4px; }
.kd-content strong { color: var(--teal, #2997ff); }
.kd-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.kd-tag { font-size: 0.78rem; background: #f0f7ff; color: var(--teal, #2997ff); padding: 4px 10px; border-radius: 20px; }

/* ==================== Checkup Styles ==================== */
.checkup-header { display: flex; justify-content: space-between; padding: 12px 16px; background: #f8f0f0; border-radius: 10px; margin-bottom: 12px; font-size: 0.85rem; }
.checkup-list { margin-top: 4px; }
.checkup-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.checkup-item.done { opacity: 0.6; }
.checkup-status { font-size: 1.1rem; width: 28px; text-align: center; flex-shrink: 0; }
.checkup-week { font-weight: 600; font-size: 0.88rem; margin-bottom: 2px; color: var(--text); }
.checkup-desc { font-size: 0.8rem; color: var(--text-light, #999); }

/* ==================== Stats Styles ==================== */
.stats-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.chart-card { background: var(--card-bg, #fff); border-radius: 12px; padding: 16px; margin-bottom: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.chart-card h4 { font-size: 0.9rem; margin-bottom: 12px; color: var(--text, #333); }

/* ==================== Badge Dot ==================== */
.notification-bell { position: relative; }
.badge-dot {
  position: absolute; top: -4px; right: -8px;
  background: var(--rose, #e74c3c); color: #fff;
  font-size: 0.6rem; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* ==================== Skeleton Loading ==================== */
@keyframes shimmer { 0% { background-position: -200px 0; } 100% { background-position: calc(200px + 100%) 0; } }
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}
.skeleton-text { height: 14px; margin-bottom: 8px; width: 80%; }
.skeleton-title { height: 20px; margin-bottom: 12px; width: 60%; }
.skeleton-card { height: 120px; margin-bottom: 12px; }

/* ==================== Pull-to-refresh hint ==================== */
.pull-hint { text-align: center; padding: 8px; font-size: 0.78rem; color: var(--text-light, #999); }

/* ==================== Timeline Styles ==================== */
.timeline { position: relative; padding-left: 20px; }
.timeline::before { content: ''; position: absolute; left: 28px; top: 0; bottom: 0; width: 2px; background: #f0e0e0; }
.timeline-item { position: relative; padding: 0 0 20px 20px; }
.timeline-dot { position: absolute; left: -8px; top: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--card-bg, #fff); display: flex; align-items: center; justify-content: center; font-size: 1rem; box-shadow: 0 1px 4px rgba(0,0,0,0.08); z-index: 1; }
.timeline-content { background: var(--card-bg, #fff); border-radius: 12px; padding: 12px 14px; box-shadow: 0 1px 6px rgba(0,0,0,0.04); }
.timeline-date { font-size: 0.75rem; color: var(--text-light, #999); margin-bottom: 4px; }
.timeline-image-wrap { width: 100%; border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.timeline-image { width: 100%; max-height: 200px; object-fit: cover; border-radius: 8px; }
.timeline-title { font-weight: 700; font-size: 0.9rem; color: var(--text, #333); margin-bottom: 2px; }
.timeline-desc { font-size: 0.82rem; color: var(--text-light, #888); }

/* ==================== Growth Chart Styles ==================== */
.growth-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.growth-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; padding: 8px 0; }
.legend-item { display: flex; align-items: center; gap: 4px; font-size: 0.78rem; color: var(--text-light); }
.legend-line { width: 20px; height: 3px; border-radius: 2px; }
.legend-line.ref { background: #f59e0b44; }
.legend-line.ref-mid { background: #f59e0b88; border-top: 1px dashed #f59e0b88; height: 0; }
.legend-line.baby { background: #e8858c; }

/* ==================== Buddies Styles ==================== */
.buddies-my-info { padding: 10px 16px; background: #f8f0f0; border-radius: 10px; margin-bottom: 12px; font-size: 0.85rem; }
.buddy-card { cursor: pointer; margin-bottom: 8px; transition: transform 0.1s; }
.buddy-card:active { transform: scale(0.98); }
.buddy-name { font-weight: 600; font-size: 0.9rem; color: var(--text, #333); }
.buddy-meta { font-size: 0.78rem; color: var(--text-light, #999); margin-top: 2px; }
.buddy-posts { font-size: 0.78rem; color: var(--teal, #2997ff); white-space: nowrap; }

/* ==================== Check-in Styles ==================== */
.checkin-badge {
  display: flex; align-items: center; gap: 6px;
  background: #fff5f5; border: 1px solid var(--rose, #e8858c);
  border-radius: 24px; padding: 8px 16px; margin: 8px 0 0;
  font-size: 0.82rem; cursor: pointer; transition: all 0.2s;
}
.checkin-badge.done { background: #f0fdf4; border-color: #10b981; }
.checkin-badge:active { transform: scale(0.97); }
.checkin-icon { font-size: 1.1rem; }
.checkin-text { font-weight: 600; color: var(--rose, #e8858c); }
.checkin-badge.done .checkin-text { color: #10b981; }
.checkin-streak { margin-left: auto; font-size: 0.78rem; color: #f59e0b; font-weight: 600; }

/* ==================== Kick Counter Styles ==================== */
.kick-start-view { text-align: center; padding: 40px 20px; }
.kick-welcome-icon { font-size: 5rem; margin-bottom: 12px; }
.kick-active-view { text-align: center; padding: 20px; }
.kick-timer { font-size: 2.5rem; font-weight: 300; color: var(--text-light); font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.kick-count-display { font-size: 4rem; font-weight: 700; color: var(--rose, #e8858c); line-height: 1; }
.kick-label { font-size: 1rem; color: var(--text-light); margin-bottom: 24px; }
.kick-actions { margin: 16px 0; }

/* ==================== Smart Home Dashboard ==================== */
.daily-tip-card {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #fef9ef, #fff5e6);
  border: 1px solid #fde68a; border-radius: 14px;
  padding: 12px 16px; margin-bottom: 8px; cursor: pointer;
  transition: all 0.2s;
}
.daily-tip-card:active { transform: scale(0.98); }
.tip-icon { font-size: 1.5rem; flex-shrink: 0; }
.tip-label { font-size: 0.7rem; font-weight: 600; color: #d97706; text-transform: uppercase; letter-spacing: 0.5px; }
.tip-text { font-size: 0.82rem; color: #92400e; line-height: 1.4; }
.tip-arrow { font-size: 1.5rem; color: #f59e0b; flex-shrink: 0; }

.home-progress-card {
  background: white; border-radius: 16px; padding: 16px;
  margin: 8px 0; box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}
.progress-row { display: flex; align-items: center; gap: 16px; }
.progress-ring-container { flex-shrink: 0; }
.progress-title { font-size: 0.95rem; font-weight: 600; color: #333; }
.progress-sub { font-size: 0.75rem; color: var(--text-light); margin: 2px 0 8px; }
.progress-bar-bg { height: 4px; background: #fce4ec; border-radius: 2px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, #f472b6, #e8858c); border-radius: 2px; transition: width 0.5s ease; }
.progress-bar-fill.teal { background: linear-gradient(90deg, #4db6ac, #26a69a); }
.progress-month-labels { display: flex; justify-content: space-between; font-size: 0.6rem; color: #bbb; margin-top: 3px; }

.stat-card-sm {
  background: #f8f9ff; border-radius: 14px; padding: 12px 8px;
  text-align: center; cursor: pointer; transition: all 0.15s;
  border: 1px solid #eee;
}
.stat-card-sm:active { transform: scale(0.95); }
.stat-card-sm.teal { background: #f0fdfa; }
.stat-card-sm.gold { background: #fffbeb; }
.stat-card-sm.rose { background: #fff1f2; }
.s-icon { font-size: 1.3rem; margin-bottom: 2px; }
.s-value { font-size: 1.2rem; font-weight: 700; color: #333; }
.s-label { font-size: 0.65rem; color: var(--text-light); margin-top: 1px; }

.today-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.today-item {
  text-align: center; padding: 8px 4px;
  background: #fafafa; border-radius: 10px;
}
.ti-icon { display: block; font-size: 1.1rem; }
.ti-val { display: block; font-size: 0.85rem; font-weight: 600; color: #333; margin: 2px 0; }
.ti-lbl { display: block; font-size: 0.6rem; color: var(--text-light); }

.quick-actions-grid { margin: 12px 0; }
.qa-grid-title { font-size: 0.8rem; font-weight: 600; color: var(--text-light); margin-bottom: 8px; }
.qa-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.qa-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: white; border-radius: 14px; padding: 12px 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04); text-decoration: none;
  transition: all 0.15s;
}
.qa-card:active { transform: scale(0.95); }
.qa-card-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.qa-card-icon.pink-bg { background: #fce4ec; }
.qa-card-icon.teal-bg { background: #e0f2f1; }
.qa-card-icon.rose-bg { background: #ffe4e6; }
.qa-card-icon.blue-bg { background: #e0e7ff; }
.qa-card-icon.gold-bg { background: #fef3c7; }
.qa-card-icon.purple-bg { background: #f3e8ff; }
.qa-card-icon.green-bg { background: #d1fae5; }
.qa-card-icon.orange-bg { background: #ffedd5; }
.qa-card-icon.red-bg { background: #fee2e2; }
.qa-card-icon.indigo-bg { background: #e0e7ff; }
.qa-card-label { font-size: 0.65rem; color: var(--text); text-align: center; line-height: 1.2; }

.activity-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-bottom: 1px solid var(--border-light);
}
.activity-item:last-child { border-bottom: none; }
.act-icon { font-size: 1rem; flex-shrink: 0; }
.act-text { font-size: 0.82rem; color: var(--text); }
.act-time { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }

/* ==================== Weekly Guide ==================== */
.guide-nav { display: flex; align-items: center; gap: 8px; }
.guide-current { font-size: 0.9rem; font-weight: 600; color: var(--rose); min-width: 60px; text-align: center; }
.guide-card { margin-top: 4px; }
.guide-header {
  border-radius: 16px; padding: 20px; margin-bottom: 12px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
.guide-header.pink { background: linear-gradient(135deg, #fce4ec, #f8bbd0); }
.guide-header.teal { background: linear-gradient(135deg, #e0f2f1, #b2dfdb); }
.guide-baby-size { display: flex; align-items: center; gap: 12px; }
.size-emoji { font-size: 2.5rem; }
.size-label { font-size: 1.1rem; font-weight: 600; color: #333; }
.size-desc { font-size: 0.8rem; color: #666; margin-top: 2px; }
.size-metrics { display: flex; gap: 16px; }
.metric { text-align: center; }
.m-val { display: block; font-size: 1rem; font-weight: 700; color: #e8858c; }
.m-lbl { display: block; font-size: 0.65rem; color: #888; }
.guide-section {
  background: white; border-radius: 14px; padding: 16px;
  margin-bottom: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.gs-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 8px; color: #333; }
.gs-content { font-size: 0.82rem; color: #555; line-height: 1.6; }
.guide-line { padding: 3px 0; padding-left: 12px; border-left: 2px solid var(--rose-soft); margin-bottom: 4px; }
.guide-header.teal .guide-line { border-left-color: #80cbc4; }

/* ==================== Contraction Timer ==================== */
.ct-main { max-width: 400px; margin: 0 auto; }
.ct-display {
  background: white; border-radius: 20px; padding: 32px 20px;
  text-align: center; box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  margin-bottom: 16px; transition: all 0.3s;
}
.ct-display.active { box-shadow: 0 2px 20px rgba(232,133,140,0.25); }
.ct-status { font-size: 0.85rem; color: var(--text-light); margin-bottom: 12px; }
.ct-time { font-size: 3.5rem; font-weight: 300; color: #e8858c; font-variant-numeric: tabular-nums; letter-spacing: 2px; }
.ct-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 12px; }
.ct-controls { display: flex; gap: 10px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; }
.ct-btn {
  padding: 14px 32px; border: none; border-radius: 30px;
  font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.ct-btn:active { transform: scale(0.95); }
.ct-btn.start { background: linear-gradient(135deg, #4db6ac, #26a69a); color: white; }
.ct-btn.stop { background: linear-gradient(135deg, #e8858c, #d4646b); color: white; }
.ct-btn.reset { background: #f5f5f5; color: #999; font-size: 0.85rem; padding: 14px 20px; }
.ct-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.ct-summary-item { text-align: center; background: #fafafa; border-radius: 12px; padding: 10px 4px; }
.cts-label { display: block; font-size: 0.6rem; color: var(--text-light); }
.cts-value { display: block; font-size: 0.85rem; font-weight: 600; color: #333; margin-top: 2px; }
.ct-hospital-guide {
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 14px;
  padding: 14px 16px; margin-bottom: 12px; line-height: 1.6;
}
.hg-title { font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.hg-content { font-size: 0.82rem; color: #555; }
.hg-urgent { color: #dc2626; font-weight: 600; }
.cth-title { font-size: 0.8rem; font-weight: 600; color: var(--text-light); margin-bottom: 8px; }
.cth-list { display: flex; flex-direction: column; gap: 4px; }
.cth-item {
  display: flex; gap: 10px; align-items: center;
  background: white; border-radius: 10px; padding: 8px 12px;
  font-size: 0.8rem; color: #333;
}
.cth-num { color: var(--text-light); min-width: 28px; }
.cth-start { color: var(--text-light); min-width: 60px; }
.cth-duration { font-weight: 600; color: #e8858c; flex: 1; }
.cth-interval { color: #4db6ac; font-weight: 500; }

/* ── Forum Multi-Image Upload ── */
.forum-upload-area {
  border: 2px dashed var(--border);
  border-radius: 12px; padding: 24px 16px; text-align: center;
  cursor: pointer; transition: var(--transition);
  background: var(--bg);
}
.forum-upload-area:hover { border-color: var(--rose-soft); background: var(--rose-light); }
.forum-upload-hint { font-size: 0.9rem; color: var(--text-light); }
.forum-preview-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.forum-preview-item { position: relative; width: 80px; height: 80px; }
.forum-preview-img { width: 80px; height: 80px; object-fit: cover; border-radius: 10px; }
.forum-preview-remove {
  position: absolute; top: -6px; right: -6px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #e83e8c; color: white; border: 2px solid white;
  font-size: 14px; line-height: 16px; text-align: center; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.forum-upload-progress { margin-top: 8px; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.forum-upload-bar { height: 100%; background: var(--rose); border-radius: 3px; transition: width 0.3s; }

/* ── Forum Detail Gallery ── */
.forum-detail-gallery { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.forum-detail-img {
  width: calc(33.33% - 6px); max-height: 200px;
  object-fit: cover; border-radius: 10px; cursor: pointer;
  transition: transform 0.2s;
}
.forum-detail-img:hover { transform: scale(1.02); }
@media (max-width: 480px) {
  .forum-detail-img { width: calc(50% - 4px); max-height: 160px; }
}

/* ── Lightbox ── */
.forum-lightbox {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999; background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
}
.forum-lightbox-close {
  position: absolute; top: 16px; right: 16px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.15); color: white; border: none;
  font-size: 28px; cursor: pointer; line-height: 40px; text-align: center;
}
.forum-lightbox-img { max-width: 90%; max-height: 85%; border-radius: 8px; object-fit: contain; }
.forum-lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,0.15); color: white; border: none;
  font-size: 32px; cursor: pointer; line-height: 48px; text-align: center;
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.forum-lightbox-counter {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  color: white; font-size: 0.85rem; background: rgba(0,0,0,0.5);
  padding: 4px 14px; border-radius: 20px;
}

/* ── History Items ── */
.history-item {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border-light);
  gap: 8px;
}
.history-item:last-child { border-bottom: none; }
.history-item-left { flex: 1; min-width: 0; }
.history-date { font-weight: 600; font-size: 0.85rem; margin-bottom: 4px; }
.history-summary { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 0.78rem; color: var(--text-light); }
.history-symptoms { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }
.history-notes { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; font-style: italic; }
.mood-tag { font-size: 0.78rem; }
.btn-danger-icon {
  background: none; border: none; cursor: pointer;
  font-size: 1rem; padding: 4px; border-radius: 6px;
  opacity: 0.5; transition: var(--transition); flex-shrink: 0;
  margin-top: 2px;
}
.btn-danger-icon:hover { opacity: 1; background: #fee2e2; }

/* ============================================
   妈妈宝宝 · Video Player Styles
   Bilibili embedded video player
   ============================================ */

/* ── Video Page ── */
.video-page { padding-bottom: 110px; }

/* ── Category Tabs ── */
.video-tabs-row {
  display: flex; gap: 8px; margin-bottom: 16px;
  overflow-x: auto; padding: 2px;
  -webkit-overflow-scrolling: touch;
}
.video-tab {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 8px; border: none; border-radius: var(--radius-lg);
  background: var(--card); cursor: pointer;
  transition: all 0.3s ease; box-shadow: var(--shadow-sm);
  color: var(--text-light); position: relative; overflow: hidden;
}
.video-tab::after {
  content: ''; position: absolute; bottom: 0; left: 20%; right: 20%;
  height: 3px; border-radius: 3px;
  background: transparent; transition: all 0.3s ease;
}
.video-tab.active {
  color: var(--text); box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.video-tab.active::after { background: var(--rose); left: 30%; right: 30%; }
.video-tab:active { transform: scale(0.97); }
.vt-icon { font-size: 1.5rem; }
.vt-label { font-size: 0.75rem; font-weight: 600; }
.vt-count { font-size: 0.6rem; color: var(--text-muted); }

/* ── Category Intro ── */
.video-category-intro {
  padding: 12px 4px 10px; margin-bottom: 12px;
}
.vci-title {
  font-size: 1.1rem; font-weight: 700; margin-bottom: 4px;
}
.vci-emoji { display: inline-block; margin-left: 4px; }
.vci-desc {
  font-size: 0.78rem; color: var(--text-light);
  line-height: 1.5;
}

/* ── Video Grid ── */
.video-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 400px) {
  .video-grid { grid-template-columns: 1fr; }
}
@media (min-width: 768px) {
  .video-grid { grid-template-columns: repeat(3, 1fr); }
}

.video-card {
  background: var(--card); border-radius: var(--radius-md);
  overflow: hidden; box-shadow: var(--shadow-sm);
  cursor: pointer; transition: all 0.3s ease;
}
.video-card:active { transform: scale(0.97); }
.video-card.active { box-shadow: 0 0 0 2px var(--rose), var(--shadow-md); }

/* ── Thumbnail ── */
.vc-thumb-wrap {
  position: relative; width: 100%; padding-top: 56.25%;
  background: var(--rose-light); overflow: hidden;
}
.vc-thumb {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform 0.4s ease;
}
.video-card:hover .vc-thumb,
.video-card.active .vc-thumb { transform: scale(1.08); }

.vc-duration-badge {
  position: absolute; bottom: 6px; right: 6px;
  background: rgba(0,0,0,0.75); color: white;
  font-size: 0.65rem; padding: 2px 6px; border-radius: 4px;
  font-weight: 500; backdrop-filter: blur(4px);
}

.vc-play-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.2);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s ease;
}
.video-card:hover .vc-play-overlay,
.video-card.active .vc-play-overlay { opacity: 1; }

.vc-play-circle {
  width: 50px; height: 50px; border-radius: 50%;
  background: rgba(255,255,255,0.9); border: none;
  font-size: 1.3rem; display: flex; align-items: center;
  justify-content: center; color: var(--rose);
  transition: transform 0.2s; cursor: pointer;
  padding-left: 4px;
}
.vc-play-circle:active { transform: scale(0.9); }

/* ── Card Info ── */
.vc-info { padding: 10px 12px 12px; }
.vc-title {
  font-size: 0.8rem; font-weight: 600; margin-bottom: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.4;
}
.vc-author {
  font-size: 0.7rem; color: var(--text-light);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── Video Player Modal ── */
.video-player-modal {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.8);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: vpmFadeIn 0.25s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
@keyframes vpmFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.vpm-content {
  width: 100%; max-width: 760px;
  background: var(--card); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: vpmSlideUp 0.3s ease;
}
@keyframes vpmSlideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.vpm-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border-light);
}
.vpm-title {
  font-size: 0.85rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; margin-right: 10px;
}
.vpm-close {
  background: none; border: none; font-size: 1.2rem;
  cursor: pointer; color: var(--text-light);
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; flex-shrink: 0;
}
.vpm-close:hover { background: var(--rose-light); color: var(--rose); }

.vpm-player-wrap {
  position: relative; width: 100%; padding-top: 56.25%;
  background: #000;
}
.vpm-iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  border: none;
}

.vpm-footer {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 16px; font-size: 0.75rem;
  color: var(--text-light); border-top: 1px solid var(--border-light);
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .video-tab { padding: 10px 6px; }
  .vt-icon { font-size: 1.2rem; }
  .vt-label { font-size: 0.65rem; }
  .video-player-modal { padding: 0; }
  .vpm-content { border-radius: 0; max-width: 100%; min-height: 100vh; }
  .vpm-header { padding: 12px 14px; }
  .vpm-player-wrap { padding-top: 56.25%; }
}
@media (min-width: 768px) {
  .video-player-modal { padding: 40px; }
}
