/* ===== CSS Variables & Reset ===== */
:root {
  --primary: #FFD700;
  --primary-dark: #e6c200;
  --primary-light: #fff3b0;
  --secondary: #00008B;
  --secondary-light: #1a1ab8;
  --accent: #32CD32;
  --accent-dark: #28a428;
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f0f0f2;
  --on-primary: #1a1200;
  --on-secondary: #ffffff;
  --text-primary: #1a1a2e;
  --text-secondary: #6b7280;
  --text-hint: #9ca3af;
  --divider: #e5e7eb;
  --danger: #ef4444;
  --danger-dark: #dc2626;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.15), 0 4px 12px rgba(0,0,0,0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --nav-height: 64px;
  --bar-height: 56px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* ===== App Bar ===== */
.app-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--bar-height);
  background: var(--secondary);
  display: flex; align-items: center; padding: 0 8px;
  box-shadow: 0 2px 8px rgba(0,0,139,0.3);
}

.app-bar-back {
  display: none;
  align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: none; border: none; cursor: pointer;
  color: var(--primary); border-radius: 50%;
  transition: background var(--transition);
  flex-shrink: 0;
}
.app-bar-back:active { background: rgba(255,215,0,0.15); }
.app-bar-back svg { width: 24px; height: 24px; }
.app-bar-back.visible { display: flex; }

.app-bar-title {
  flex: 1; text-align: center;
  font-size: 18px; font-weight: 600;
  color: var(--primary); letter-spacing: 0.3px;
}

.app-bar-actions {
  display: flex; gap: 4px; flex-shrink: 0;
}

.icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: none; border: none; cursor: pointer;
  color: var(--primary); border-radius: 50%;
  transition: background var(--transition);
}
.icon-btn:active { background: rgba(255,215,0,0.15); }
.icon-btn svg { width: 22px; height: 22px; }

/* ===== Screen Container ===== */
.screen-container {
  position: fixed; top: var(--bar-height); bottom: var(--nav-height);
  left: 0; right: 0; overflow: hidden;
}

.screen {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  opacity: 0; pointer-events: none;
  transform: translateX(20px);
  transition: opacity var(--transition), transform var(--transition);
}
.screen.active {
  opacity: 1; pointer-events: all;
  transform: translateX(0);
}
.screen.slide-in-left { transform: translateX(-20px); }

.screen-scroll {
  height: 100%; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 0 0;
}

/* ===== Bottom Navigation ===== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-height);
  background: var(--surface);
  display: flex; align-items: stretch;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.1);
  border-top: 1px solid var(--divider);
}

.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
  color: var(--text-secondary); gap: 3px;
  transition: color var(--transition);
  position: relative; overflow: hidden;
  padding: 8px 4px;
  min-height: 44px;
}
.nav-item:active::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(0,0,139,0.06); border-radius: var(--radius-sm);
}
.nav-item.active { color: var(--secondary); }
.nav-item.active .nav-icon { transform: scale(1.1); }

.nav-icon { width: 22px; height: 22px; transition: transform var(--transition); }
.nav-label { font-size: 10px; font-weight: 500; letter-spacing: 0.3px; }

/* ===== FAB ===== */
.fab {
  position: fixed; bottom: calc(var(--nav-height) + 16px); right: 20px;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--primary); color: var(--on-primary);
  border: none; cursor: pointer; z-index: 99;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(255,215,0,0.5);
  transition: transform var(--transition), box-shadow var(--transition);
}
.fab:active { transform: scale(0.92); box-shadow: 0 2px 8px rgba(255,215,0,0.4); }
.fab.hidden { transform: scale(0); pointer-events: none; }

/* ===== Dashboard ===== */
.dashboard-hero {
  margin: 0 16px 16px;
  background: linear-gradient(135deg, var(--secondary) 0%, #1a1ab8 100%);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow-md);
}
.dashboard-greeting { display: flex; flex-direction: column; gap: 4px; }
.greeting-text { font-size: 20px; font-weight: 700; color: var(--primary); }
.greeting-sub { font-size: 13px; color: rgba(255,255,255,0.7); }
.hero-avatar { font-size: 48px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)); }

.stats-row {
  display: flex; gap: 10px; padding: 0 16px 16px;
}
.stat-card {
  flex: 1; background: var(--surface);
  border-radius: var(--radius-md); padding: 16px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  box-shadow: var(--shadow-sm);
}
.stat-value { font-size: 28px; font-weight: 700; color: var(--secondary); }
.stat-label { font-size: 11px; color: var(--text-secondary); font-weight: 500; }

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px 10px;
}
.section-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.section-action {
  font-size: 13px; font-weight: 500; color: var(--secondary);
  background: none; border: none; cursor: pointer;
  padding: 4px 8px; border-radius: var(--radius-sm);
}
.section-action:active { background: rgba(0,0,139,0.08); }

/* Activity List */
.activity-list { padding: 0 16px 4px; display: flex; flex-direction: column; gap: 8px; }

.activity-item {
  background: var(--surface); border-radius: var(--radius-md);
  padding: 12px 14px; display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-sm); cursor: pointer;
  transition: transform var(--transition);
}
.activity-item:active { transform: scale(0.98); }

.activity-icon {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
  background: var(--primary-light);
}
.activity-info { flex: 1; min-width: 0; }
.activity-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.activity-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.activity-time { font-size: 11px; color: var(--text-hint); flex-shrink: 0; }

/* Pet Chips */
.pet-chips-row {
  padding: 0 16px 16px;
  display: flex; gap: 10px; overflow-x: auto;
  scrollbar-width: none;
}
.pet-chips-row::-webkit-scrollbar { display: none; }

.pet-chip {
  flex-shrink: 0; background: var(--surface);
  border-radius: var(--radius-md); padding: 12px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  box-shadow: var(--shadow-sm); cursor: pointer; min-width: 80px;
  border: 2px solid transparent; transition: border-color var(--transition);
}
.pet-chip:active { border-color: var(--primary); }
.pet-chip-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.pet-chip-emoji { font-size: 28px; line-height: 44px; }
.pet-chip-name { font-size: 12px; font-weight: 600; color: var(--text-primary); text-align: center; }
.pet-chip-count { font-size: 10px; color: var(--text-secondary); }

/* Chart */
.chart-card {
  margin: 0 16px 16px;
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 16px; box-shadow: var(--shadow-sm); min-height: 100px;
}
.chart-bars { display: flex; align-items: flex-end; gap: 8px; height: 80px; }
.chart-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.chart-bar {
  width: 100%; border-radius: 4px 4px 0 0;
  background: var(--primary); min-height: 4px;
  transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.chart-bar-label { font-size: 10px; color: var(--text-secondary); }
.chart-empty { color: var(--text-hint); font-size: 13px; text-align: center; width: 100%; padding: 20px 0; }

/* ===== List Container ===== */
.list-container { padding: 0 16px; display: flex; flex-direction: column; gap: 10px; }

/* ===== List Tile ===== */
.list-tile {
  background: var(--surface); border-radius: var(--radius-md);
  display: flex; align-items: center; padding: 14px;
  box-shadow: var(--shadow-sm); cursor: pointer; gap: 14px;
  transition: transform var(--transition);
  position: relative; overflow: hidden;
}
.list-tile:active { transform: scale(0.98); }
.list-tile::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(0,0,0,0); transition: background 0.15s;
}
.list-tile:active::after { background: rgba(0,0,0,0.04); }

.tile-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
}
.tile-emoji {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
  background: var(--primary-light);
}

.tile-content { flex: 1; min-width: 0; }
.tile-title {
  font-size: 15px; font-weight: 600; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile-subtitle {
  font-size: 13px; color: var(--text-secondary);
  margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile-meta { font-size: 11px; color: var(--text-hint); margin-top: 3px; }

.tile-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.tile-badge {
  font-size: 11px; font-weight: 600; padding: 3px 8px;
  border-radius: 20px; background: var(--primary-light);
  color: var(--secondary);
}
.tile-chevron { color: var(--text-hint); }
.tile-chevron svg { width: 18px; height: 18px; }

/* Swipe actions */
.tile-actions {
  display: flex; gap: 8px; flex-shrink: 0;
}
.tile-action-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer;
  transition: transform var(--transition), background var(--transition);
}
.tile-action-btn:active { transform: scale(0.9); }
.btn-edit { background: rgba(0,0,139,0.1); color: var(--secondary); }
.btn-delete { background: rgba(239,68,68,0.1); color: var(--danger); }
.tile-action-btn svg { width: 16px; height: 16px; }

/* ===== Chips ===== */
.chips-row {
  display: flex; gap: 8px; padding: 8px 16px 12px;
  overflow-x: auto; scrollbar-width: none; flex-shrink: 0;
}
.chips-row::-webkit-scrollbar { display: none; }

.chip {
  flex-shrink: 0; padding: 6px 14px;
  border-radius: 20px; font-size: 13px; font-weight: 500;
  border: 1.5px solid var(--divider);
  background: var(--surface); color: var(--text-secondary);
  cursor: pointer; transition: all var(--transition);
  white-space: nowrap;
}
.chip:active { transform: scale(0.96); }
.chip.active {
  background: var(--secondary); color: var(--on-secondary);
  border-color: var(--secondary);
}

/* ===== Search Bar ===== */
.search-bar-wrapper { padding: 4px 16px 8px; }
.search-bar {
  background: var(--surface); border-radius: var(--radius-xl);
  display: flex; align-items: center; padding: 0 14px;
  box-shadow: var(--shadow-sm); border: 1.5px solid var(--divider);
  transition: border-color var(--transition);
}
.search-bar:focus-within { border-color: var(--secondary); }
.search-icon { width: 18px; height: 18px; color: var(--text-hint); flex-shrink: 0; }
.search-bar input {
  flex: 1; border: none; background: none; padding: 12px 10px;
  font-size: 14px; color: var(--text-primary); outline: none;
  font-family: inherit;
}
.search-bar input::placeholder { color: var(--text-hint); }
.clear-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-hint); font-size: 14px; padding: 4px; line-height: 1;
}

/* ===== Gallery ===== */
.gallery-filter-row {
  display: flex; gap: 8px; padding: 8px 16px 12px;
  overflow-x: auto; scrollbar-width: none;
}
.gallery-filter-row::-webkit-scrollbar { display: none; }

.gallery-grid {
  padding: 0 16px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}
.gallery-item {
  aspect-ratio: 1; border-radius: var(--radius-sm);
  overflow: hidden; cursor: pointer; position: relative;
  background: var(--surface-2);
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--transition);
}
.gallery-item:active img { transform: scale(0.95); }
.gallery-item-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  padding: 8px 6px 5px;
  opacity: 0; transition: opacity var(--transition);
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }
.gallery-item-label { font-size: 10px; color: white; font-weight: 500; }
.gallery-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  background: linear-gradient(135deg, var(--primary-light), var(--surface-2));
}

/* ===== Pet Detail ===== */
.pet-detail-header {
  display: flex; flex-direction: column; align-items: center;
  padding: 24px 16px 16px; gap: 8px;
  background: linear-gradient(180deg, var(--secondary) 0%, transparent 100%);
}
.pet-detail-avatar {
  width: 90px; height: 90px; border-radius: 50%;
  overflow: hidden; background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; border: 3px solid var(--primary);
  box-shadow: var(--shadow-md);
}
.pet-detail-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pet-detail-name { font-size: 24px; font-weight: 700; color: white; }
.pet-detail-meta { font-size: 13px; color: rgba(255,255,255,0.7); }

.detail-section { padding: 0 0 8px; }
.detail-card {
  margin: 0 16px;
  background: var(--surface); border-radius: var(--radius-md);
  padding: 16px; box-shadow: var(--shadow-sm);
}
.detail-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--divider);
}
.detail-row:last-child { border-bottom: none; padding-bottom: 0; }
.detail-label { font-size: 13px; color: var(--text-secondary); }
.detail-value { font-size: 14px; font-weight: 500; color: var(--text-primary); text-align: right; max-width: 60%; }

/* ===== Entry Detail ===== */
.entry-detail-content { padding: 16px; }
.entry-hero-img {
  width: 100%; height: 220px; border-radius: var(--radius-lg);
  object-fit: cover; margin-bottom: 16px;
  box-shadow: var(--shadow-md);
}
.entry-hero-placeholder {
  width: 100%; height: 220px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  display: flex; align-items: center; justify-content: center;
  font-size: 64px; margin-bottom: 16px;
}
.entry-detail-card {
  background: var(--surface); border-radius: var(--radius-md);
  padding: 16px; box-shadow: var(--shadow-sm); margin-bottom: 12px;
}
.entry-detail-title { font-size: 20px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.entry-detail-date { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; }
.entry-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: 20px; font-size: 12px;
  font-weight: 600; background: var(--primary-light); color: var(--secondary);
  margin-bottom: 12px;
}
.entry-notes { font-size: 14px; color: var(--text-primary); line-height: 1.6; }
.entry-actions-row {
  display: flex; gap: 10px; margin-top: 16px;
}
.entry-actions-row .btn-secondary,
.entry-actions-row .btn-danger { flex: 1; }

/* ===== Bottom Sheet ===== */
.overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.5);
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
  backdrop-filter: blur(2px);
}
.overlay.visible { opacity: 1; pointer-events: all; }

.bottom-sheet {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 201;
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.bottom-sheet.open { transform: translateY(0); }

.sheet-handle {
  width: 40px; height: 4px; background: var(--divider);
  border-radius: 2px; margin: 12px auto 0; flex-shrink: 0;
}
.sheet-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; border-bottom: 1px solid var(--divider);
  flex-shrink: 0;
}
.sheet-title { font-size: 17px; font-weight: 600; color: var(--text-primary); }
.sheet-close {
  background: var(--surface-2); border: none; cursor: pointer;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 14px;
  transition: background var(--transition);
}
.sheet-close:active { background: var(--divider); }
.sheet-body { overflow-y: auto; padding: 16px 20px; flex: 1; -webkit-overflow-scrolling: touch; }

/* ===== Form ===== */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.required { color: var(--danger); }
.form-input {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--divider);
  border-radius: var(--radius-md);
  font-size: 15px; font-family: inherit;
  color: var(--text-primary); background: var(--surface);
  outline: none; transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none; appearance: none;
}
.form-input:focus { border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(0,0,139,0.1); }
.form-input::placeholder { color: var(--text-hint); }
.form-textarea { resize: vertical; min-height: 80px; }
select.form-input { cursor: pointer; }

.photo-preview {
  margin-top: 10px; position: relative;
  border-radius: var(--radius-md); overflow: hidden;
  max-height: 160px;
}
.photo-preview img { width: 100%; height: 160px; object-fit: cover; display: block; }
.remove-photo-btn {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,0.6); color: white;
  border: none; border-radius: 50%; width: 28px; height: 28px;
  cursor: pointer; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}

.sheet-actions {
  display: flex; gap: 12px; padding-top: 8px; padding-bottom: env(safe-area-inset-bottom, 16px);
}

/* ===== Buttons ===== */
.btn-primary {
  flex: 1; padding: 14px;
  background: var(--secondary); color: white;
  border: none; border-radius: var(--radius-md);
  font-size: 15px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: all var(--transition);
}
.btn-primary:active { background: var(--secondary-light); transform: scale(0.98); }

.btn-secondary {
  flex: 1; padding: 14px;
  background: var(--surface-2); color: var(--text-primary);
  border: 1.5px solid var(--divider); border-radius: var(--radius-md);
  font-size: 15px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: all var(--transition);
}
.btn-secondary:active { background: var(--divider); transform: scale(0.98); }

.btn-danger {
  padding: 14px;
  background: var(--danger); color: white;
  border: none; border-radius: var(--radius-md);
  font-size: 15px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: all var(--transition);
}
.btn-danger:active { background: var(--danger-dark); transform: scale(0.98); }

/* ===== Dialog ===== */
.dialog-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.5); display: flex;
  align-items: center; justify-content: center;
  padding: 24px; opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
  backdrop-filter: blur(3px);
}
.dialog-overlay.visible { opacity: 1; pointer-events: all; }
.dialog {
  background: var(--surface); border-radius: var(--radius-xl);
  padding: 28px 24px; width: 100%; max-width: 320px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.9);
  transition: transform var(--transition);
}
.dialog-overlay.visible .dialog { transform: scale(1); }
.dialog-icon { font-size: 40px; text-align: center; margin-bottom: 12px; }
.dialog-title { font-size: 18px; font-weight: 700; text-align: center; margin-bottom: 8px; }
.dialog-message { font-size: 14px; color: var(--text-secondary); text-align: center; line-height: 1.5; margin-bottom: 20px; }
.dialog-actions { display: flex; gap: 10px; }

/* ===== Snackbar ===== */
.snackbar {
  position: fixed; bottom: calc(var(--nav-height) + 80px); left: 16px; right: 16px;
  z-index: 400; background: #323232; color: white;
  border-radius: var(--radius-md); padding: 14px 16px;
  font-size: 14px; font-weight: 500;
  display: flex; align-items: center; justify-content: space-between;
  transform: translateY(20px); opacity: 0; pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-lg);
}
.snackbar.visible { transform: translateY(0); opacity: 1; pointer-events: all; }

/* ===== Image Viewer ===== */
.image-viewer {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.95);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
.image-viewer.visible { opacity: 1; pointer-events: all; }
.image-viewer img { max-width: 100%; max-height: 85vh; object-fit: contain; border-radius: var(--radius-sm); }
.image-viewer-close {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,0.2); border: none; color: white;
  width: 40px; height: 40px; border-radius: 50%;
  cursor: pointer; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}

/* ===== Empty States ===== */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 48px 32px; text-align: center;
  gap: 12px;
}
.empty-icon { font-size: 56px; line-height: 1; }
.empty-title { font-size: 17px; font-weight: 600; color: var(--text-primary); }
.empty-message { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.empty-action {
  margin-top: 8px; padding: 12px 24px;
  background: var(--secondary); color: white;
  border: none; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}
.empty-action:active { background: var(--secondary-light); transform: scale(0.98); }

.empty-state-inline {
  text-align: center; padding: 24px;
  font-size: 13px; color: var(--text-hint);
  width: 100%;
}

/* ===== Skeleton ===== */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--divider) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-tile {
  background: var(--surface); border-radius: var(--radius-md);
  padding: 14px; display: flex; gap: 14px; align-items: center;
  box-shadow: var(--shadow-sm);
}
.skeleton-avatar { width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; }
.skeleton-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.skeleton-line { height: 14px; border-radius: 4px; }
.skeleton-line.short { width: 60%; }

/* ===== Activity badge colors ===== */
.badge-vet { background: rgba(239,68,68,0.12); color: #dc2626; }
.badge-grooming { background: rgba(168,85,247,0.12); color: #7c3aed; }
.badge-feeding { background: rgba(234,179,8,0.12); color: #a16207; }
.badge-exercise { background: rgba(50,205,50,0.12); color: #16a34a; }
.badge-medication { background: rgba(59,130,246,0.12); color: #1d4ed8; }
.badge-other { background: rgba(107,114,128,0.12); color: #374151; }

/* ===== Scrollbar hide ===== */
.screen-scroll::-webkit-scrollbar { display: none; }
.screen-scroll { scrollbar-width: none; }

/* ===== Detail screen back ===== */
.detail-screen { background: var(--bg); }

/* ===== Utility ===== */
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }

/* ===== Safe area ===== */
@supports (padding: env(safe-area-inset-bottom)) {
  .bottom-nav { padding-bottom: env(safe-area-inset-bottom); height: calc(var(--nav-height) + env(safe-area-inset-bottom)); }
  .screen-container { bottom: calc(var(--nav-height) + env(safe-area-inset-bottom)); }
  .fab { bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 16px); }
  .snackbar { bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 80px); }
}
