/* ═══════════════════════════════════════════════════════════
   PawsAI — Design System
   Palette: Chlorophyll-inspired organic green
   Fonts: Bricolage Grotesque (display) + Spline Sans Mono (accent)
   Tone: Organic/Natural — warm, trustworthy, alive
═══════════════════════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
  /* Core Palette */
  --green-900: #0A1F02;
  --green-800: #122B08;
  --green-700: #1A3D0E;
  --green-600: #2D6A1E;
  --green-500: #3D8A28;
  --green-400: #5AAD3F;
  --green-300: #7DC962;
  --green-200: #A8E08C;
  --green-100: #D4F0C0;
  --green-50:  #F0FFF0;

  --lime-400: #B8F369;
  --lime-300: #CCFF88;
  --lime-200: #DFFFAA;

  --earth-900: #1C1208;
  --earth-700: #3D2B1F;
  --earth-500: #6B4C35;
  --earth-300: #A07850;
  --earth-100: #E8D5B8;
  --earth-50:  #FAF5EE;

  --white: #FAFFF8;
  --off-white: #F2FAF0;
  --surface: #FFFFFF;
  --surface-2: #F5FBF3;
  --surface-3: #EBF7E6;

  --text-primary: #0A1F02;
  --text-secondary: #2D6A1E;
  --text-muted: #5AAD3F;
  --text-body: #1C2E14;
  --text-light: #6B8F5E;

  --border: #C8E8B8;
  --border-strong: #9DD080;

  /* Semantic Colors */
  --success: #3D8A28;
  --warning: #D4A017;
  --danger: #C0392B;
  --info: #2980B9;

  /* AI Accent */
  --ai-primary: #B8F369;
  --ai-secondary: #5AAD3F;
  --ai-glow: rgba(184, 243, 105, 0.3);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(10, 31, 2, 0.08), 0 1px 2px rgba(10, 31, 2, 0.04);
  --shadow-md: 0 4px 12px rgba(10, 31, 2, 0.10), 0 2px 6px rgba(10, 31, 2, 0.06);
  --shadow-lg: 0 10px 30px rgba(10, 31, 2, 0.12), 0 4px 12px rgba(10, 31, 2, 0.08);
  --shadow-xl: 0 20px 50px rgba(10, 31, 2, 0.16);
  --shadow-ai: 0 0 20px rgba(184, 243, 105, 0.25), 0 4px 12px rgba(10, 31, 2, 0.10);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Layout */
  --header-h: 60px;
  --bottom-nav-h: 72px;
  --sidebar-w: 260px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;
}

/* ── 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: 'Bricolage Grotesque', system-ui, sans-serif;
  background: var(--off-white);
  color: var(--text-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
img { max-width: 100%; display: block; }

/* ── Utility ── */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ═══════════════════════════════════════════
   SPLASH SCREEN
═══════════════════════════════════════════ */
.splash-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--green-900);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

.splash-bg-orbs { position: absolute; inset: 0; pointer-events: none; }

.orb {
  position: absolute; border-radius: 50%;
  filter: blur(60px); opacity: 0.4;
  animation: orbFloat 8s ease-in-out infinite;
}
.orb-1 { width: 300px; height: 300px; background: var(--green-600); top: -80px; left: -80px; animation-delay: 0s; }
.orb-2 { width: 250px; height: 250px; background: var(--lime-400); bottom: -60px; right: -60px; animation-delay: -3s; }
.orb-3 { width: 200px; height: 200px; background: var(--green-400); top: 50%; left: 50%; transform: translate(-50%,-50%); animation-delay: -6s; }

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

.splash-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  gap: var(--space-xl); padding: var(--space-xl);
  text-align: center;
}

.splash-logo { display: flex; flex-direction: column; align-items: center; gap: var(--space-sm); }

.logo-paw {
  font-size: 72px; line-height: 1;
  animation: pawBounce 2s var(--ease-spring) infinite;
  filter: drop-shadow(0 0 20px rgba(184, 243, 105, 0.5));
}

@keyframes pawBounce {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-12px) rotate(5deg); }
}

.splash-title {
  font-size: clamp(48px, 10vw, 72px);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -2px;
  line-height: 1;
}

.splash-tagline {
  font-size: 16px;
  color: var(--lime-400);
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.splash-features {
  display: flex; flex-direction: column; gap: var(--space-sm);
  width: 100%; max-width: 280px;
}

.splash-feature {
  display: flex; align-items: center; gap: var(--space-md);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(184, 243, 105, 0.2);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--white);
  font-size: 15px;
  font-weight: 500;
  opacity: 0;
  transform: translateX(-20px);
  animation: slideInFeature 0.5s var(--ease-out) forwards;
  animation-delay: var(--delay);
}

.sf-icon { font-size: 20px; }

@keyframes slideInFeature {
  to { opacity: 1; transform: translateX(0); }
}

.btn-splash {
  background: var(--lime-400);
  color: var(--green-900);
  font-size: 17px;
  font-weight: 700;
  padding: 16px 48px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  transition: all var(--duration-base) var(--ease-out);
  box-shadow: 0 0 30px rgba(184, 243, 105, 0.4);
  animation: fadeInUp 0.6s var(--ease-out) 1s both;
}

.btn-splash:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 40px rgba(184, 243, 105, 0.6);
}

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

/* ═══════════════════════════════════════════
   APP SHELL
═══════════════════════════════════════════ */
.app {
  display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100dvh;
  background: var(--off-white);
}

/* ── Header ── */
.app-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(250, 255, 248, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--space-md);
  gap: var(--space-sm);
}

.header-left, .header-right {
  display: flex; align-items: center; gap: var(--space-sm);
  flex: 1;
}
.header-right { justify-content: flex-end; }
.header-center { flex: 2; display: flex; justify-content: center; }

.header-brand {
  display: flex; align-items: center; gap: 6px;
  font-size: 18px; font-weight: 800;
  color: var(--green-900);
  letter-spacing: -0.5px;
}
.brand-paw { font-size: 20px; }

.btn-icon {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-body);
  transition: all var(--duration-fast);
}
.btn-icon:hover { background: var(--surface-3); color: var(--green-600); }

/* Pet Switcher */
.pet-switcher {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 6px 12px 6px 8px;
  cursor: pointer;
  transition: all var(--duration-fast);
  max-width: 180px;
}
.pet-switcher:hover { border-color: var(--green-400); background: var(--green-50); }
.pet-switcher-avatar { font-size: 18px; }
.pet-switcher-name {
  font-size: 13px; font-weight: 600;
  color: var(--text-body);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 90px;
}

/* Notification Button */
.notification-btn { position: relative; }
.notif-badge {
  position: absolute; top: 4px; right: 4px;
  background: var(--danger);
  color: white; font-size: 9px; font-weight: 700;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--off-white);
}

/* User Avatar */
.user-avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--green-600), var(--green-400));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: transform var(--duration-fast);
}
.user-avatar:hover { transform: scale(1.05); }

/* ── Sidebar ── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 200;
  width: var(--sidebar-w);
  transform: translateX(-100%);
  transition: transform var(--duration-slow) var(--ease-out);
}
.sidebar.open { transform: translateX(0); }

.sidebar-overlay {
  position: fixed; inset: 0; z-index: -1;
  background: rgba(10, 31, 2, 0.5);
  opacity: 0; pointer-events: none;
  transition: opacity var(--duration-slow);
}
.sidebar.open .sidebar-overlay { opacity: 1; pointer-events: all; }

.sidebar-nav {
  position: relative; z-index: 1;
  width: var(--sidebar-w);
  height: 100%;
  background: var(--green-900);
  display: flex; flex-direction: column;
  overflow-y: auto;
  padding-bottom: var(--space-xl);
}

.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-lg) var(--space-md);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand {
  display: flex; align-items: center; gap: 8px;
  font-size: 20px; font-weight: 800;
  color: var(--white);
}
.sidebar-close { color: rgba(255,255,255,0.6); }
.sidebar-close:hover { color: white; }

.sidebar-section-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  padding: var(--space-md) var(--space-md) var(--space-xs);
}

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px var(--space-md);
  color: rgba(255,255,255,0.65);
  font-size: 14px; font-weight: 500;
  border-radius: 0;
  transition: all var(--duration-fast);
  position: relative;
}
.nav-item:hover { color: white; background: rgba(255,255,255,0.06); }
.nav-item.active {
  color: var(--lime-400);
  background: rgba(184, 243, 105, 0.1);
}
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--lime-400);
  border-radius: 0 2px 2px 0;
}

.nav-badge {
  margin-left: auto;
  background: var(--lime-400);
  color: var(--green-900);
  font-size: 9px; font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
}
.nav-badge.urgent { background: var(--danger); color: white; }

.sidebar-footer { margin-top: auto; border-top: 1px solid rgba(255,255,255,0.08); padding-top: var(--space-sm); }

/* ── Main Content ── */
.main-content {
  margin-top: var(--header-h);
  padding-bottom: calc(var(--bottom-nav-h) + var(--space-md));
  min-height: calc(100vh - var(--header-h));
  position: relative;
}

/* ── Views ── */
.view {
  display: none;
  padding: var(--space-lg) var(--space-md);
  animation: viewEnter 0.3s var(--ease-out);
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}
.view.active { display: block; }

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

.view-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: var(--space-lg);
  gap: var(--space-md);
}
.view-title {
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 800;
  color: var(--green-900);
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.view-subtitle {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 2px;
}

/* ═══════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════ */
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--green-600);
  color: white;
  font-size: 14px; font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}
.btn-primary:hover { background: var(--green-700); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent;
  color: var(--green-600);
  font-size: 14px; font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--green-400);
  transition: all var(--duration-fast);
  white-space: nowrap;
}
.btn-outline:hover { background: var(--green-50); border-color: var(--green-600); }

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

.btn-ai {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--green-600), var(--green-500));
  color: white;
  font-size: 15px; font-weight: 700;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  transition: all var(--duration-base) var(--ease-out);
  box-shadow: var(--shadow-ai);
  width: 100%;
  justify-content: center;
  margin-top: var(--space-md);
}
.btn-ai:hover { transform: translateY(-2px); box-shadow: 0 0 30px rgba(184, 243, 105, 0.4), var(--shadow-md); }
.btn-ai-icon { font-size: 18px; }

.btn-send {
  width: 42px; height: 42px;
  background: var(--green-600);
  color: white;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--duration-fast);
  flex-shrink: 0;
}
.btn-send:hover { background: var(--green-700); transform: scale(1.05); }

/* ═══════════════════════════════════════════
   DASHBOARD
═══════════════════════════════════════════ */

/* AI Banner */
.ai-banner {
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 100%);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  display: flex; align-items: center; gap: var(--space-md);
  margin-bottom: var(--space-lg);
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.ai-banner::before {
  content: '';
  position: absolute; top: -50%; right: -20%;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(184,243,105,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.ai-banner-icon { font-size: 36px; flex-shrink: 0; }
.ai-banner-content { flex: 1; min-width: 0; }
.ai-banner-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--lime-400); margin-bottom: 4px;
}
.ai-banner-title {
  font-size: 18px; font-weight: 700;
  color: white; line-height: 1.3;
}
.ai-banner-sub { font-size: 12px; color: rgba(255,255,255,0.6); margin-top: 2px; }

/* Score Ring */
.ai-score-ring {
  position: relative; width: 72px; height: 72px; flex-shrink: 0;
}
.score-svg { width: 72px; height: 72px; transform: rotate(-90deg); }
.score-bg {
  fill: none; stroke: rgba(255,255,255,0.15);
  stroke-width: 3;
}
.score-fill {
  fill: none; stroke: var(--lime-400);
  stroke-width: 3; stroke-linecap: round;
  transition: stroke-dasharray 1.5s var(--ease-out);
}
.score-number {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800;
  color: white;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  display: flex; align-items: center; gap: var(--space-sm);
  cursor: pointer;
  transition: all var(--duration-fast);
  position: relative; overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green-400), var(--lime-400));
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--duration-base) var(--ease-out);
}
.stat-card:hover { border-color: var(--green-300); box-shadow: var(--shadow-md); }
.stat-card:hover::after { transform: scaleX(1); }

.stat-icon { font-size: 28px; flex-shrink: 0; }
.stat-info { flex: 1; min-width: 0; }
.stat-value { font-size: 18px; font-weight: 800; color: var(--green-900); line-height: 1.2; }
.stat-label { font-size: 11px; color: var(--text-light); font-weight: 500; }
.stat-trend {
  font-size: 11px; font-weight: 600;
  color: var(--text-light);
  white-space: nowrap;
}
.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* Charts Row */
.charts-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
}
.chart-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-md);
}
.chart-header h3 {
  font-size: 15px; font-weight: 700;
  color: var(--green-900);
}
.chart-badge {
  font-size: 11px; font-weight: 600;
  background: var(--surface-3);
  color: var(--green-600);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}
.chart-container { position: relative; height: 180px; }

/* Dashboard Bottom */
.dashboard-bottom {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.recent-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}
.card-header-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-md);
}
.card-header-row h3 {
  font-size: 15px; font-weight: 700;
  color: var(--green-900);
}
.link-sm {
  font-size: 13px; font-weight: 600;
  color: var(--green-600);
  transition: color var(--duration-fast);
}
.link-sm:hover { color: var(--green-800); }

/* AI Insights Panel */
.ai-insights-panel {
  background: linear-gradient(135deg, var(--green-50), var(--surface-3));
  border: 1px solid var(--green-200);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}
.aip-header {
  display: flex; align-items: center; gap: var(--space-md);
  margin-bottom: var(--space-md);
}
.aip-icon { font-size: 32px; }
.aip-header h3 { font-size: 16px; font-weight: 700; color: var(--green-900); }
.aip-header p { font-size: 13px; color: var(--text-light); }

.insights-list { display: flex; flex-direction: column; gap: var(--space-sm); }

.insight-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-size: 13px; color: var(--text-body);
  line-height: 1.5;
  animation: insightIn 0.4s var(--ease-out) both;
}
.insight-item.loading { color: var(--text-light); font-style: italic; }

.insight-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green-400);
  flex-shrink: 0; margin-top: 4px;
}
.insight-dot.warning { background: var(--warning); }
.insight-dot.danger { background: var(--danger); }
.insight-dot.info { background: var(--info); }

@keyframes insightIn {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ═══════════════════════════════════════════
   PET CARDS
═══════════════════════════════════════════ */
.pets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
}

.pet-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--duration-base) var(--ease-out);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.pet-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--green-300); }

.pet-card-header {
  background: linear-gradient(135deg, var(--green-800), var(--green-600));
  padding: var(--space-lg);
  display: flex; align-items: center; gap: var(--space-md);
  position: relative;
}
.pet-card-emoji {
  font-size: 52px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}
.pet-card-info { flex: 1; }
.pet-card-name {
  font-size: 20px; font-weight: 800;
  color: white; line-height: 1.2;
}
.pet-card-breed {
  font-size: 13px; color: rgba(255,255,255,0.7);
  margin-top: 2px;
}
.pet-card-age {
  font-size: 12px;
  background: rgba(255,255,255,0.15);
  color: white;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-top: 6px;
}

.pet-card-body { padding: var(--space-md); }

.pet-stats-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}
.pet-stat {
  text-align: center;
  padding: 8px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}
.pet-stat-val { font-size: 15px; font-weight: 700; color: var(--green-900); }
.pet-stat-lbl { font-size: 10px; color: var(--text-light); font-weight: 500; }

.pet-health-bar {
  display: flex; align-items: center; gap: var(--space-sm);
  margin-bottom: var(--space-md);
}
.health-bar-label { font-size: 12px; color: var(--text-light); white-space: nowrap; }
.health-bar-track {
  flex: 1; height: 6px;
  background: var(--surface-3);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.health-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-400), var(--lime-400));
  border-radius: var(--radius-full);
  transition: width 1s var(--ease-out);
}
.health-bar-score { font-size: 12px; font-weight: 700; color: var(--green-600); }

.pet-card-actions {
  display: flex; gap: var(--space-sm);
}
.pet-card-actions .btn-outline { flex: 1; justify-content: center; }
.pet-card-actions .btn-primary { flex: 1; justify-content: center; }

/* Active Pet Indicator */
.pet-card.active-pet {
  border-color: var(--green-400);
  box-shadow: 0 0 0 2px var(--green-200), var(--shadow-md);
}

/* ═══════════════════════════════════════════
   RECORDS LIST
═══════════════════════════════════════════ */
.records-list { display: flex; flex-direction: column; gap: var(--space-sm); }

.record-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  display: flex; align-items: flex-start; gap: var(--space-md);
  transition: all var(--duration-fast);
  animation: recordIn 0.3s var(--ease-out) both;
}
.record-item:hover { border-color: var(--green-300); box-shadow: var(--shadow-sm); }

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

.record-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
  background: var(--surface-3);
}
.record-icon.medical { background: #FEF3F2; }
.record-icon.activity { background: #F0FFF0; }
.record-icon.vaccine { background: #EFF6FF; }
.record-icon.grooming { background: #FFF7ED; }

.record-body { flex: 1; min-width: 0; }
.record-title {
  font-size: 14px; font-weight: 700;
  color: var(--green-900); line-height: 1.3;
}
.record-meta {
  font-size: 12px; color: var(--text-light);
  margin-top: 2px;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.record-notes {
  font-size: 12px; color: var(--text-body);
  margin-top: 4px; line-height: 1.5;
}

.record-actions {
  display: flex; gap: 4px; flex-shrink: 0;
}
.record-action-btn {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-light);
  transition: all var(--duration-fast);
  font-size: 14px;
}
.record-action-btn:hover { background: var(--surface-3); color: var(--green-600); }
.record-action-btn.delete:hover { background: #FEF2F2; color: var(--danger); }

/* Status Badges */
.status-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}
.status-badge.active { background: #DCFCE7; color: #166534; }
.status-badge.overdue { background: #FEF2F2; color: #991B1B; }
.status-badge.upcoming { background: #FEF9C3; color: #854D0E; }
.status-badge.completed { background: #F0FDF4; color: #166534; }
.status-badge.info { background: #EFF6FF; color: #1E40AF; }

/* ═══════════════════════════════════════════
   MEDICAL TABS
═══════════════════════════════════════════ */
.medical-tabs {
  display: flex; gap: 4px;
  background: var(--surface-3);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: var(--space-lg);
  overflow-x: auto;
  scrollbar-width: none;
}
.medical-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  flex: 1; min-width: max-content;
  padding: 8px 14px;
  font-size: 13px; font-weight: 600;
  color: var(--text-light);
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast);
  white-space: nowrap;
}
.tab-btn.active {
  background: var(--surface);
  color: var(--green-700);
  box-shadow: var(--shadow-sm);
}
.tab-btn:hover:not(.active) { color: var(--green-600); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ═══════════════════════════════════════════
   AI MODULES
═══════════════════════════════════════════ */
.ai-module-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.ai-module-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green-500), var(--lime-400));
}

.ai-module-header {
  display: flex; align-items: flex-start; gap: var(--space-md);
  margin-bottom: var(--space-md);
}
.ai-module-icon { font-size: 28px; flex-shrink: 0; }
.ai-module-header h3 { font-size: 16px; font-weight: 700; color: var(--green-900); }
.ai-module-header p { font-size: 13px; color: var(--text-light); margin-top: 2px; }
.ai-module-header .btn-sm { margin-left: auto; flex-shrink: 0; }

/* AI Status Badge */
.ai-status-badge {
  display: flex; align-items: center; gap: 6px;
  background: var(--green-50);
  border: 1px solid var(--green-200);
  color: var(--green-700);
  font-size: 12px; font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-full);
}
.ai-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green-500);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* Symptom Checker */
.symptom-tags-label {
  font-size: 13px; font-weight: 600;
  color: var(--text-body); margin-bottom: var(--space-sm);
}
.symptom-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: var(--space-md);
}
.symptom-tag {
  padding: 6px 12px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px; font-weight: 500;
  color: var(--text-body);
  cursor: pointer;
  transition: all var(--duration-fast);
}
.symptom-tag:hover { border-color: var(--green-400); color: var(--green-700); }
.symptom-tag.selected {
  background: var(--green-100);
  border-color: var(--green-500);
  color: var(--green-800);
}

.symptom-input {
  width: 100%;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-body);
  background: var(--surface-2);
  resize: vertical;
  transition: border-color var(--duration-fast);
}
.symptom-input:focus { outline: none; border-color: var(--green-400); background: var(--surface); }

/* AI Result */
.ai-result {
  margin-top: var(--space-md);
  padding: var(--space-md);
  background: linear-gradient(135deg, var(--green-50), var(--surface-3));
  border: 1px solid var(--green-200);
  border-radius: var(--radius-lg);
  animation: fadeInUp 0.4s var(--ease-out);
}
.ai-result-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: var(--space-sm);
}
.ai-result-title { font-size: 14px; font-weight: 700; color: var(--green-900); }
.ai-result-body { font-size: 13px; color: var(--text-body); line-height: 1.7; }
.ai-result-body ul { padding-left: 16px; margin-top: 6px; }
.ai-result-body li { margin-bottom: 4px; }

/* Health Alerts */
.health-alert-item {
  display: flex; align-items: flex-start; gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  border: 1px solid;
  animation: recordIn 0.3s var(--ease-out) both;
}
.health-alert-item.low { background: #F0FDF4; border-color: #BBF7D0; }
.health-alert-item.medium { background: #FFFBEB; border-color: #FDE68A; }
.health-alert-item.high { background: #FEF2F2; border-color: #FECACA; }

.alert-icon { font-size: 22px; flex-shrink: 0; }
.alert-body { flex: 1; }
.alert-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.alert-desc { font-size: 12px; color: var(--text-light); margin-top: 2px; line-height: 1.5; }

/* Wellness Breakdown */
.wellness-breakdown { display: flex; flex-direction: column; gap: var(--space-sm); }
.wellness-item {
  display: flex; align-items: center; gap: var(--space-md);
}
.wellness-label { font-size: 13px; font-weight: 600; color: var(--text-body); width: 100px; flex-shrink: 0; }
.wellness-bar-track {
  flex: 1; height: 8px;
  background: var(--surface-3);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.wellness-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1.2s var(--ease-out);
}
.wellness-score { font-size: 13px; font-weight: 700; color: var(--green-700); width: 36px; text-align: right; }

/* AI Chat */
.ai-chat-card { display: flex; flex-direction: column; }
.chat-messages {
  max-height: 320px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: var(--space-sm);
  margin-bottom: var(--space-md);
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.chat-msg {
  display: flex; gap: 10px; align-items: flex-end;
  animation: chatIn 0.3s var(--ease-out);
}
.chat-msg.user-msg { flex-direction: row-reverse; }

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

.chat-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--green-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.chat-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13px; line-height: 1.6;
}
.ai-msg .chat-bubble {
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text-body);
  border-bottom-left-radius: 4px;
}
.user-msg .chat-bubble {
  background: var(--green-600);
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-input-row {
  display: flex; gap: var(--space-sm);
}
.chat-input {
  flex: 1;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  background: var(--surface-2);
  color: var(--text-body);
  transition: border-color var(--duration-fast);
}
.chat-input:focus { outline: none; border-color: var(--green-400); background: var(--surface); }

/* Loading AI */
.loading-ai {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: var(--space-md);
  color: var(--text-light);
  font-size: 13px;
}
.ai-spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--green-500);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════
   ACTIVITY TRACKING
═══════════════════════════════════════════ */
.activity-summary-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}
.activity-summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-sm);
  text-align: center;
  transition: all var(--duration-fast);
}
.activity-summary-card:hover { border-color: var(--green-300); box-shadow: var(--shadow-sm); }
.acs-icon { font-size: 24px; margin-bottom: 4px; }
.acs-value { font-size: 18px; font-weight: 800; color: var(--green-900); }
.acs-label { font-size: 10px; color: var(--text-light); font-weight: 500; }

.activity-plan { display: flex; flex-direction: column; gap: var(--space-sm); }
.activity-plan-item {
  display: flex; align-items: center; gap: var(--space-md);
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.api-icon { font-size: 20px; }
.api-body { flex: 1; }
.api-title { font-size: 13px; font-weight: 700; color: var(--green-900); }
.api-desc { font-size: 12px; color: var(--text-light); }
.api-duration {
  font-size: 12px; font-weight: 700;
  color: var(--green-600);
  background: var(--green-50);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.chart-period-btns { display: flex; gap: 4px; }
.period-btn {
  padding: 4px 10px;
  font-size: 12px; font-weight: 600;
  border-radius: var(--radius-sm);
  color: var(--text-light);
  transition: all var(--duration-fast);
}
.period-btn.active { background: var(--green-600); color: white; }
.period-btn:hover:not(.active) { background: var(--surface-3); color: var(--green-600); }

/* Activity Type Picker */
.activity-type-picker {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: var(--space-md);
}
.act-type-btn {
  padding: 8px 14px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600;
  color: var(--text-body);
  transition: all var(--duration-fast);
}
.act-type-btn.active {
  background: var(--green-600);
  border-color: var(--green-600);
  color: white;
}
.act-type-btn:hover:not(.active) { border-color: var(--green-400); color: var(--green-700); }

/* ═══════════════════════════════════════════
   NUTRITION
═══════════════════════════════════════════ */
.nutrition-summary {
  display: flex; gap: var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  align-items: center;
}
.nutrition-ring-card { flex-shrink: 0; }
.nutrition-ring {
  position: relative; width: 140px; height: 140px;
}
.nutrition-ring-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.nutrition-ring-center span { font-size: 22px; font-weight: 800; color: var(--green-900); }
.nutrition-ring-center small { font-size: 11px; color: var(--text-light); }

.nutrition-macros { flex: 1; display: flex; flex-direction: column; gap: var(--space-sm); }
.macro-item {
  display: flex; align-items: center; gap: var(--space-sm);
}
.macro-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.macro-label { font-size: 13px; color: var(--text-body); flex: 1; }
.macro-value { font-size: 13px; font-weight: 700; color: var(--green-900); }

.diet-plan { display: flex; flex-direction: column; gap: var(--space-sm); }
.diet-item {
  display: flex; align-items: flex-start; gap: var(--space-md);
  padding: var(--space-md);
  background: var(--surface-2);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.diet-icon { font-size: 24px; flex-shrink: 0; }
.diet-body { flex: 1; }
.diet-title { font-size: 14px; font-weight: 700; color: var(--green-900); }
.diet-desc { font-size: 12px; color: var(--text-light); margin-top: 2px; line-height: 1.5; }
.diet-amount {
  font-size: 12px; font-weight: 700;
  color: var(--green-600);
  background: var(--green-50);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.feeding-schedule { display: flex; flex-direction: column; gap: var(--space-sm); }
.schedule-item {
  display: flex; align-items: center; gap: var(--space-md);
  padding: 12px var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.schedule-time {
  font-family: 'Spline Sans Mono', monospace;
  font-size: 15px; font-weight: 600;
  color: var(--green-700);
  width: 60px; flex-shrink: 0;
}
.schedule-meal { flex: 1; font-size: 14px; font-weight: 600; color: var(--text-body); }
.schedule-amount { font-size: 13px; color: var(--text-light); }
.schedule-done {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--duration-fast);
  font-size: 12px;
}
.schedule-done.checked { background: var(--green-500); border-color: var(--green-500); color: white; }

/* ═══════════════════════════════════════════
   GROOMING
═══════════════════════════════════════════ */
.grooming-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}
.grooming-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  text-align: center;
  transition: all var(--duration-fast);
}
.grooming-card:hover { border-color: var(--green-300); box-shadow: var(--shadow-sm); }
.grooming-icon { font-size: 32px; margin-bottom: 8px; }
.grooming-type { font-size: 14px; font-weight: 700; color: var(--green-900); }
.grooming-last { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.grooming-next {
  font-size: 11px; font-weight: 600;
  margin-top: 6px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: inline-block;
}
.grooming-next.due { background: #FEF9C3; color: #854D0E; }
.grooming-next.ok { background: #DCFCE7; color: #166534; }
.grooming-next.overdue { background: #FEF2F2; color: #991B1B; }

/* ═══════════════════════════════════════════
   BREED GUIDE
═══════════════════════════════════════════ */
.search-bar-row {
  display: flex; flex-direction: column; gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}
.search-bar {
  display: flex; align-items: center; gap: var(--space-sm);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  transition: border-color var(--duration-fast);
}
.search-bar:focus-within { border-color: var(--green-400); }
.search-bar input {
  flex: 1; border: none; background: none;
  font-size: 14px; color: var(--text-body);
}
.search-bar input:focus { outline: none; }
.search-bar svg { color: var(--text-light); flex-shrink: 0; }

.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 6px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--duration-fast);
}
.chip.active { background: var(--green-600); border-color: var(--green-600); color: white; }
.chip:hover:not(.active) { border-color: var(--green-400); color: var(--green-700); }

.breeds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-md);
}

.breed-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--duration-base) var(--ease-out);
  cursor: pointer;
}
.breed-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--green-300); }

.breed-card-header {
  background: linear-gradient(135deg, var(--green-800), var(--green-600));
  padding: var(--space-lg);
  text-align: center;
}
.breed-emoji { font-size: 56px; }
.breed-card-body { padding: var(--space-md); }
.breed-name { font-size: 16px; font-weight: 800; color: var(--green-900); }
.breed-type {
  font-size: 11px; font-weight: 600;
  color: var(--green-600);
  text-transform: uppercase; letter-spacing: 1px;
  margin-top: 2px;
}
.breed-traits {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: var(--space-sm);
}
.breed-trait {
  font-size: 11px; font-weight: 500;
  background: var(--surface-3);
  color: var(--text-body);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}
.breed-stats-mini {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 6px; margin-top: var(--space-sm);
}
.bsm-item { text-align: center; }
.bsm-val { font-size: 13px; font-weight: 700; color: var(--green-700); }
.bsm-lbl { font-size: 10px; color: var(--text-light); }

/* ═══════════════════════════════════════════
   TRAINING TIPS
═══════════════════════════════════════════ */
.training-categories {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}
.training-tips-list { display: flex; flex-direction: column; gap: var(--space-md); }
.training-tip-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  transition: all var(--duration-fast);
}
.training-tip-card:hover { border-color: var(--green-300); box-shadow: var(--shadow-sm); }
.tip-header {
  display: flex; align-items: center; gap: var(--space-md);
  margin-bottom: var(--space-sm);
}
.tip-icon { font-size: 28px; }
.tip-title { font-size: 16px; font-weight: 700; color: var(--green-900); }
.tip-category {
  font-size: 11px; font-weight: 600;
  color: var(--green-600);
  background: var(--green-50);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-left: auto;
}
.tip-body { font-size: 14px; color: var(--text-body); line-height: 1.7; }
.tip-steps {
  margin-top: var(--space-sm);
  padding-left: var(--space-md);
}
.tip-steps li {
  font-size: 13px; color: var(--text-body);
  margin-bottom: 4px; line-height: 1.6;
}
.tip-difficulty {
  display: flex; align-items: center; gap: 6px;
  margin-top: var(--space-sm);
}
.diff-label { font-size: 12px; color: var(--text-light); }
.diff-dots { display: flex; gap: 3px; }
.diff-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border);
}
.diff-dot.filled { background: var(--green-500); }

/* ═══════════════════════════════════════════
   REMINDERS
═══════════════════════════════════════════ */
.reminders-filter {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.reminder-item {
  display: flex; align-items: flex-start; gap: var(--space-md);
  padding: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-sm);
  transition: all var(--duration-fast);
  animation: recordIn 0.3s var(--ease-out) both;
}
.reminder-item.overdue { border-color: #FECACA; background: #FEF2F2; }
.reminder-item.today { border-color: #FDE68A; background: #FFFBEB; }
.reminder-item:hover { box-shadow: var(--shadow-sm); }

.reminder-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
  background: var(--surface-3);
}
.reminder-body { flex: 1; min-width: 0; }
.reminder-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.reminder-meta { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.reminder-actions { display: flex; gap: 4px; }

/* Vaccine Status Banner */
.vaccine-status-banner {
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  display: flex; align-items: center; gap: var(--space-md);
  font-size: 14px; font-weight: 600;
}
.vaccine-status-banner.good { background: #DCFCE7; color: #166534; border: 1px solid #BBF7D0; }
.vaccine-status-banner.warning { background: #FFFBEB; color: #854D0E; border: 1px solid #FDE68A; }
.vaccine-status-banner.danger { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }

/* ═══════════════════════════════════════════
   SETTINGS
═══════════════════════════════════════════ */
.settings-sections { display: flex; flex-direction: column; gap: var(--space-lg); }
.settings-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.settings-group-title {
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase;
  color: var(--text-light);
  padding: var(--space-md) var(--space-lg);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.settings-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border);
  gap: var(--space-md);
}
.settings-item:last-child { border-bottom: none; }
.settings-item-label { font-size: 14px; font-weight: 600; color: var(--text-body); }
.settings-item-value { font-size: 13px; color: var(--text-light); margin-top: 2px; }

/* Toggle Switch */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--border-strong);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--duration-base);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform var(--duration-base) var(--ease-spring);
  box-shadow: var(--shadow-sm);
}
.toggle-switch input:checked + .toggle-slider { background: var(--green-500); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ═══════════════════════════════════════════
   FORMS
═══════════════════════════════════════════ */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}
.form-full { grid-column: 1 / -1; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 13px; font-weight: 600;
  color: var(--text-body);
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-body);
  background: var(--surface-2);
  transition: all var(--duration-fast);
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green-400);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(93, 173, 63, 0.1);
}
.form-group textarea { resize: vertical; }

/* Pet Avatar Picker */
.pet-avatar-picker { margin-bottom: var(--space-md); }
.avatar-options {
  display: flex; gap: 8px; flex-wrap: wrap;
  justify-content: center;
}
.avatar-opt {
  width: 52px; height: 52px;
  font-size: 28px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--duration-fast);
  background: var(--surface-2);
}
.avatar-opt:hover { border-color: var(--green-400); transform: scale(1.1); }
.avatar-opt.active { border-color: var(--green-500); background: var(--green-50); box-shadow: 0 0 0 3px rgba(93,173,63,0.2); }

/* ═══════════════════════════════════════════
   MODALS
═══════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(10, 31, 2, 0.6);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity var(--duration-base);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%; max-width: 600px;
  max-height: 92vh;
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform var(--duration-slow) var(--ease-out);
  overflow: hidden;
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-header h3 { font-size: 18px; font-weight: 800; color: var(--green-900); }
.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-light);
  transition: all var(--duration-fast);
}
.modal-close:hover { background: var(--surface-3); color: var(--text-body); }

.modal-body {
  flex: 1; overflow-y: auto;
  padding: var(--space-lg);
  scrollbar-width: thin;
}

.modal-footer {
  display: flex; gap: var(--space-sm); justify-content: flex-end;
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--surface-2);
}

/* ═══════════════════════════════════════════
   BOTTOM NAVIGATION
═══════════════════════════════════════════ */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: var(--bottom-nav-h);
  background: rgba(250, 255, 248, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 var(--space-sm);
  padding-bottom: env(safe-area-inset-bottom);
}

.bnav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  padding: 8px 4px;
  color: var(--text-light);
  font-size: 10px; font-weight: 600;
  transition: all var(--duration-fast);
  border-radius: var(--radius-md);
  position: relative;
}
.bnav-item.active { color: var(--green-600); }
.bnav-item.active svg { stroke: var(--green-600); }
.bnav-item:hover { color: var(--green-500); }

.bnav-center { position: relative; }
.bnav-center-btn {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--green-600), var(--green-500));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white;
  box-shadow: 0 4px 16px rgba(45, 106, 30, 0.4);
  transition: all var(--duration-base) var(--ease-spring);
  margin-bottom: 2px;
}
.bnav-center:hover .bnav-center-btn { transform: scale(1.08); box-shadow: 0 6px 20px rgba(45, 106, 30, 0.5); }
.bnav-center.active .bnav-center-btn { background: linear-gradient(135deg, var(--green-700), var(--green-600)); }

/* ═══════════════════════════════════════════
   NOTIFICATION PANEL
═══════════════════════════════════════════ */
.notif-panel {
  position: fixed; top: var(--header-h); right: 0; z-index: 300;
  width: 320px; max-height: 480px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  box-shadow: var(--shadow-xl);
  display: flex; flex-direction: column;
  transform: translateY(-20px) scaleY(0.9);
  transform-origin: top;
  opacity: 0; pointer-events: none;
  transition: all var(--duration-base) var(--ease-out);
}
.notif-panel.open { transform: translateY(0) scaleY(1); opacity: 1; pointer-events: all; }

.notif-overlay {
  position: fixed; inset: 0; z-index: 299;
  display: none;
}
.notif-overlay.open { display: block; }

.notif-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border);
}
.notif-panel-header h3 { font-size: 15px; font-weight: 700; color: var(--green-900); }

.notif-list { flex: 1; overflow-y: auto; padding: var(--space-sm); }
.notif-item {
  display: flex; gap: var(--space-sm);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  margin-bottom: 4px;
  cursor: pointer;
  transition: background var(--duration-fast);
}
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: var(--green-50); }
.notif-icon { font-size: 20px; flex-shrink: 0; }
.notif-body { flex: 1; }
.notif-title { font-size: 13px; font-weight: 600; color: var(--text-body); }
.notif-time { font-size: 11px; color: var(--text-light); margin-top: 2px; }

/* Pet Dropdown */
.pet-dropdown {
  position: fixed; top: calc(var(--header-h) + 4px); left: 50%; z-index: 300;
  transform: translateX(-50%) translateY(-10px) scaleY(0.9);
  transform-origin: top;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  min-width: 220px;
  opacity: 0; pointer-events: none;
  transition: all var(--duration-base) var(--ease-out);
  overflow: hidden;
}
.pet-dropdown.open { transform: translateX(-50%) translateY(0) scaleY(1); opacity: 1; pointer-events: all; }

.pet-dropdown-list { padding: var(--space-sm); }
.pet-dropdown-item {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--duration-fast);
}
.pet-dropdown-item:hover { background: var(--surface-2); }
.pet-dropdown-item.active { background: var(--green-50); }
.pet-dropdown-emoji { font-size: 22px; }
.pet-dropdown-info { flex: 1; }
.pet-dropdown-name { font-size: 14px; font-weight: 700; color: var(--text-body); }
.pet-dropdown-breed { font-size: 12px; color: var(--text-light); }
.pet-dropdown-check { color: var(--green-500); font-size: 16px; }

.pet-dropdown-add {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 12px var(--space-md);
  border-top: 1px solid var(--border);
  font-size: 13px; font-weight: 600;
  color: var(--green-600);
  transition: background var(--duration-fast);
}
.pet-dropdown-add:hover { background: var(--green-50); }

/* ═══════════════════════════════════════════
   TOAST NOTIFICATIONS
═══════════════════════════════════════════ */
.toast-container {
  position: fixed; bottom: calc(var(--bottom-nav-h) + 16px); left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex; flex-direction: column; gap: 8px;
  align-items: center;
  pointer-events: none;
  width: calc(100% - 32px); max-width: 400px;
}

.toast {
  background: var(--green-900);
  color: white;
  padding: 12px 18px;
  border-radius: var(--radius-full);
  font-size: 14px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.4s var(--ease-spring);
  pointer-events: all;
  max-width: 100%;
}
.toast.success { background: var(--green-700); }
.toast.error { background: var(--danger); }
.toast.warning { background: #D97706; }
.toast.info { background: var(--info); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateY(10px) scale(0.95); }
}

/* ═══════════════════════════════════════════
   EMPTY STATES
═══════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: var(--space-2xl) var(--space-xl);
  display: flex; flex-direction: column; align-items: center; gap: var(--space-md);
}
.empty-icon { font-size: 64px; opacity: 0.5; }
.empty-state h3 { font-size: 20px; font-weight: 700; color: var(--green-900); }
.empty-state p { font-size: 14px; color: var(--text-light); max-width: 280px; }

.empty-state-sm {
  text-align: center;
  padding: var(--space-lg);
  color: var(--text-light);
  font-size: 13px;
}

/* Activity List Items */
.activity-list-item {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.activity-list-item:last-child { border-bottom: none; }
.ali-icon { font-size: 20px; }
.ali-body { flex: 1; }
.ali-title { font-size: 13px; font-weight: 600; color: var(--text-body); }
.ali-meta { font-size: 11px; color: var(--text-light); }
.ali-value { font-size: 13px; font-weight: 700; color: var(--green-600); }

/* Reminder List Items (dashboard) */
.reminder-list-item {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.reminder-list-item:last-child { border-bottom: none; }
.rli-icon { font-size: 18px; }
.rli-body { flex: 1; }
.rli-title { font-size: 13px; font-weight: 600; color: var(--text-body); }
.rli-date { font-size: 11px; color: var(--text-light); }
.rli-badge { flex-shrink: 0; }

/* ═══════════════════════════════════════════
   RESPONSIVE — TABLET & DESKTOP
═══════════════════════════════════════════ */
@media (min-width: 640px) {
  .charts-row { grid-template-columns: repeat(2, 1fr); }
  .dashboard-bottom { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .activity-summary-row { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 768px) {
  :root { --header-h: 64px; }

  .view { padding: var(--space-xl) var(--space-xl); }

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

  .bottom-nav { display: none; }

  .main-content { padding-bottom: var(--space-xl); }

  .sidebar {
    position: fixed;
    transform: translateX(0);
    z-index: 50;
  }
  .sidebar .sidebar-overlay { display: none; }
  .sidebar-close { display: none; }

  .main-content {
    margin-left: var(--sidebar-w);
  }

  .app-header { left: var(--sidebar-w); }

  .modal-overlay { align-items: center; }
  .modal {
    border-radius: var(--radius-xl);
    max-height: 85vh;
    transform: scale(0.95) translateY(10px);
  }
  .modal-overlay.open .modal { transform: scale(1) translateY(0); }

  .notif-panel { right: var(--space-md); border-radius: var(--radius-xl); }
}

@media (min-width: 1024px) {
  .view { max-width: 960px; }
  .breeds-grid { grid-template-columns: repeat(3, 1fr); }
  .pets-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1280px) {
  .view { max-width: 1100px; }
  .pets-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ═══════════════════════════════════════════
   SCROLLBAR STYLING
═══════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--green-400); }

/* ═══════════════════════════════════════════
   PRINT STYLES
═══════════════════════════════════════════ */
@media print {
  .app-header, .sidebar, .bottom-nav, .btn-primary, .btn-outline { display: none !important; }
  .main-content { margin: 0; padding: 0; }
  .view { display: block !important; }
}

/* ═══════════════════════════════════════════
   ANIMATIONS — Reduced Motion
═══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}