/* ═══════════════════════════════════════════
   PETPAL TRACKER — Design System
   Mobile-first, Material Design inspired
═══════════════════════════════════════════ */

/* ── Variables ── */
:root {
  --primary:       #ff7979;
  --primary-dark:  #e85c5c;
  --primary-light: #ffadad;
  --secondary:     #badc58;
  --secondary-dark:#9abf3a;
  --accent:        #f9ca24;
  --accent-dark:   #e0b400;

  --bg:            #f4f5f7;
  --surface:       #ffffff;
  --surface-2:     #f8f9fa;
  --border:        #e8eaed;
  --divider:       #f0f0f0;

  --text-primary:  #1a1a2e;
  --text-secondary:#6b7280;
  --text-hint:     #9ca3af;
  --text-on-primary: #ffffff;

  --shadow-sm:  0 1px 4px rgba(0,0,0,.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.14);
  --shadow-fab: 0 6px 20px rgba(255,121,121,.45);

  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --app-bar-h:  56px;
  --nav-h:      64px;
  --transition: .22s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
a { text-decoration: none; color: inherit; }

/* ── App Shell ── */
#app {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100dvh;
  height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0,0,0,.18);
}

/* ── Top App Bar ── */
.app-bar {
  position: relative;
  z-index: 100;
  height: var(--app-bar-h);
  background: var(--surface);
  display: flex;
  align-items: center;
  padding: 0 8px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.app-bar-title {
  flex: 1;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.3px;
}
.app-bar-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-primary);
  transition: background var(--transition);
  flex-shrink: 0;
}
.app-bar-btn:active { background: var(--bg); }
.app-bar-btn svg { width: 22px; height: 22px; }

/* ── Screen Container ── */
.screen-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* ── Individual Screens ── */
.screen {
  position: absolute;
  inset: 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-left {
  transform: translateX(-20px);
  opacity: 0;
  pointer-events: none;
}
.screen-scroll {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 16px;
  scrollbar-width: none;
}
.screen-scroll::-webkit-scrollbar { display: none; }

/* ── Bottom Nav ── */
.bottom-nav {
  height: var(--nav-h);
  background: var(--surface);
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
  z-index: 100;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-hint);
  transition: color var(--transition);
  position: relative;
  padding: 8px 4px;
}
.nav-item::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 3px;
  background: var(--primary);
  border-radius: 0 0 4px 4px;
  transition: width var(--transition);
}
.nav-item.active { color: var(--primary); }
.nav-item.active::before { width: 28px; }
.nav-icon { width: 22px; height: 22px; flex-shrink: 0; }
.nav-label { font-size: 10px; font-weight: 600; letter-spacing: .2px; }

/* ── FAB ── */
.fab {
  position: absolute;
  bottom: calc(var(--nav-h) + 16px);
  right: 20px;
  z-index: 200;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-fab);
  transition: transform .15s ease, box-shadow .15s ease;
}
.fab:active {
  transform: scale(.92);
  box-shadow: 0 3px 10px rgba(255,121,121,.35);
}
.fab svg { width: 24px; height: 24px; }
.fab.hidden { transform: scale(0); opacity: 0; }

/* ══════════════════════════════════════════
   GREETING CARD
══════════════════════════════════════════ */
.greeting-card {
  margin: 16px 16px 0;
  background: linear-gradient(135deg, var(--primary) 0%, #ff9e9e 100%);
  border-radius: var(--radius-lg);
  padding: 20px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  box-shadow: 0 6px 24px rgba(255,121,121,.30);
}
.greeting-sub { font-size: 12px; font-weight: 500; opacity: .85; margin-bottom: 4px; }
.greeting-title { font-size: 22px; font-weight: 700; }
.greeting-icon { font-size: 48px; line-height: 1; }

/* ══════════════════════════════════════════
   STATS ROW
══════════════════════════════════════════ */
.stats-row {
  display: flex;
  gap: 10px;
  margin: 14px 16px 0;
}
.stat-card {
  flex: 1;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary);
}
.stat-card--secondary { border-left-color: var(--secondary); }
.stat-card--accent    { border-left-color: var(--accent); }
.stat-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
}
.stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 500;
}

/* ══════════════════════════════════════════
   SECTION HEADERS
══════════════════════════════════════════ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 16px 10px;
}
.section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.2px;
}
.section-action {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  padding: 4px 8px;
  border-radius: 8px;
  transition: background var(--transition);
}
.section-action:active { background: var(--primary-light); }

/* ══════════════════════════════════════════
   CARDS
══════════════════════════════════════════ */
.card {
  background: var(--surface);
  border-radius: var(--radius-md);
  margin: 0 16px 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.empty-inline {
  padding: 20px;
  text-align: center;
  color: var(--text-hint);
  font-size: 13px;
}

/* ══════════════════════════════════════════
   LOG LIST TILES
══════════════════════════════════════════ */
.log-tile {
  background: var(--surface);
  margin: 0 16px 10px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  padding: 12px 14px;
  gap: 12px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
  position: relative;
  overflow: hidden;
}
.log-tile:active { transform: scale(.98); box-shadow: var(--shadow-sm); }
.log-tile-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.log-tile-body { flex: 1; min-width: 0; }
.log-tile-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.log-tile-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.log-tile-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.log-tile-date {
  font-size: 11px;
  color: var(--text-hint);
  font-weight: 500;
}
.log-tile-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--primary-light);
  color: var(--primary-dark);
  text-transform: capitalize;
}
.badge--feeding    { background: #fff3e0; color: #e65100; }
.badge--grooming   { background: #f3e5f5; color: #7b1fa2; }
.badge--exercise   { background: #e8f5e9; color: #2e7d32; }
.badge--vet\ visit { background: #e3f2fd; color: #1565c0; }
.badge--medication { background: #fce4ec; color: #c62828; }
.badge--bathing    { background: #e0f7fa; color: #006064; }
.badge--training   { background: #fffde7; color: #f57f17; }
.badge--playtime   { background: #f1f8e9; color: #558b2f; }
.badge--other      { background: #f5f5f5; color: #424242; }

.chevron-icon {
  width: 16px; height: 16px;
  color: var(--text-hint);
  flex-shrink: 0;
  margin-left: 4px;
}

/* ══════════════════════════════════════════
   ACTIVITY BREAKDOWN BARS
══════════════════════════════════════════ */
.breakdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--divider);
}
.breakdown-item:last-child { border-bottom: none; }
.breakdown-emoji { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.breakdown-label { font-size: 13px; font-weight: 500; color: var(--text-primary); min-width: 80px; }
.breakdown-bar-wrap { flex: 1; height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.breakdown-bar { height: 100%; border-radius: 3px; background: var(--primary); transition: width .4s ease; }
.breakdown-count { font-size: 12px; font-weight: 600; color: var(--text-secondary); min-width: 24px; text-align: right; }

/* ══════════════════════════════════════════
   QUICK ACTIONS
══════════════════════════════════════════ */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 0 16px;
}
.quick-action-btn {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 14px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease;
}
.quick-action-btn:active { transform: scale(.94); }
.qa-icon { font-size: 26px; }
.qa-label { font-size: 10px; font-weight: 600; color: var(--text-secondary); text-align: center; }

/* ══════════════════════════════════════════
   SEARCH
══════════════════════════════════════════ */
.search-container { padding: 14px 16px 0; }
.search-bar {
  background: var(--surface);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid transparent;
  transition: border-color var(--transition);
}
.search-bar:focus-within { border-color: var(--primary); }
.search-icon { width: 18px; height: 18px; color: var(--text-hint); flex-shrink: 0; }
.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--text-primary);
  height: 44px;
}
.search-input::placeholder { color: var(--text-hint); }
.search-clear {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.search-clear svg { width: 14px; height: 14px; color: var(--text-secondary); }

/* ── Filter Chips ── */
.chips-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chips-row::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface);
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  border: 1.5px solid transparent;
  transition: all var(--transition);
}
.chip--active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ══════════════════════════════════════════
   REMINDERS
══════════════════════════════════════════ */
.reminder-tile {
  background: var(--surface);
  margin: 0 16px 10px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
}
.reminder-tile--past { opacity: .55; }
.reminder-accent {
  width: 4px;
  align-self: stretch;
  border-radius: 2px;
  background: var(--primary);
  flex-shrink: 0;
}
.reminder-tile--past .reminder-accent { background: var(--text-hint); }
.reminder-body { flex: 1; min-width: 0; }
.reminder-pet { font-size: 11px; font-weight: 600; color: var(--primary); margin-bottom: 2px; }
.reminder-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.reminder-date { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.reminder-emoji { font-size: 22px; flex-shrink: 0; }
.reminder-actions { display: flex; gap: 6px; flex-shrink: 0; }
.icon-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: background var(--transition);
}
.icon-btn:active { background: var(--border); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn--delete svg { color: var(--primary); }
.icon-btn--edit svg { color: var(--text-secondary); }

/* ══════════════════════════════════════════
   PET PROFILES
══════════════════════════════════════════ */
.pet-card {
  background: var(--surface);
  margin: 0 16px 12px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.pet-card-header {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  gap: 14px;
  border-bottom: 1px solid var(--divider);
}
.pet-avatar {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary) 0%, #7ec848 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}
.pet-info { flex: 1; }
.pet-name { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.pet-species { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.pet-card-actions { display: flex; gap: 8px; }
.pet-card-body { padding: 12px 16px; display: flex; gap: 16px; flex-wrap: wrap; }
.pet-stat { display: flex; flex-direction: column; gap: 2px; }
.pet-stat-label { font-size: 10px; font-weight: 600; color: var(--text-hint); text-transform: uppercase; letter-spacing: .4px; }
.pet-stat-value { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.pet-log-count {
  margin-left: auto;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  align-self: center;
}

/* ══════════════════════════════════════════
   APP INFO
══════════════════════════════════════════ */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--divider);
}
.info-label { font-size: 14px; color: var(--text-primary); }
.info-value { font-size: 14px; font-weight: 600; color: var(--text-secondary); }

/* ══════════════════════════════════════════
   DETAIL SCREEN
══════════════════════════════════════════ */
.detail-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #ff9e9e 100%);
  padding: 32px 24px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #fff;
}
.detail-avatar {
  width: 72px; height: 72px;
  background: rgba(255,255,255,.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}
.detail-pet-name { font-size: 22px; font-weight: 700; }
.detail-activity { font-size: 14px; opacity: .9; }
.detail-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.detail-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.detail-field-label { font-size: 11px; font-weight: 600; color: var(--text-hint); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.detail-field-value { font-size: 14px; color: var(--text-primary); line-height: 1.5; }
.detail-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--primary-dark);
  text-transform: capitalize;
}
.detail-actions {
  display: flex;
  gap: 12px;
  padding: 4px 16px 16px;
}
.detail-btn {
  flex: 1;
  height: 48px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .12s ease;
}
.detail-btn:active { transform: scale(.97); }
.detail-btn--edit {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255,121,121,.3);
}
.detail-btn--delete {
  background: var(--surface);
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.detail-btn svg { width: 18px; height: 18px; }

/* ══════════════════════════════════════════
   EMPTY STATES
══════════════════════════════════════════ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  gap: 10px;
  text-align: center;
}
.empty-icon { font-size: 56px; line-height: 1; margin-bottom: 4px; }
.empty-title { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.empty-sub { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

/* ══════════════════════════════════════════
   BOTTOM SHEETS
══════════════════════════════════════════ */
.sheet-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.sheet-overlay.visible { opacity: 1; pointer-events: all; }

.bottom-sheet {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 400;
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding-bottom: env(safe-area-inset-bottom, 16px);
  transform: translateY(100%);
  transition: transform .32s cubic-bezier(.4,0,.2,1);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}
.bottom-sheet.open { transform: translateY(0); }

.sheet-handle {
  width: 36px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 12px auto 0;
  flex-shrink: 0;
}
.sheet-header {
  display: flex;
  align-items: center;
  padding: 14px 20px 10px;
  flex-shrink: 0;
}
.sheet-title { flex: 1; font-size: 18px; font-weight: 700; color: var(--text-primary); }
.sheet-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.sheet-close:active { background: var(--border); }
.sheet-close svg { width: 18px; height: 18px; color: var(--text-secondary); }
.sheet-body {
  padding: 4px 20px 20px;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: none;
}
.sheet-body::-webkit-scrollbar { display: none; }

/* ══════════════════════════════════════════
   FORM INPUTS (Material Floating Labels)
══════════════════════════════════════════ */
.input-group {
  position: relative;
  margin-bottom: 18px;
}
.input-field {
  width: 100%;
  height: 52px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 14px 6px;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition);
  appearance: none;
}
.input-field:focus { border-color: var(--primary); }
.input-field.textarea-field {
  height: auto;
  resize: none;
  padding-top: 22px;
  line-height: 1.5;
}
.input-field.select-field {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.input-field--date { color: var(--text-primary); }
.input-label {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--text-hint);
  pointer-events: none;
  transition: all .18s ease;
  transform-origin: left top;
}
.input-field:focus ~ .input-label,
.input-field:not(:placeholder-shown) ~ .input-label {
  top: 9px;
  transform: translateY(0) scale(.78);
  color: var(--primary);
  font-weight: 600;
}
.input-label--raised {
  top: 9px;
  transform: translateY(0) scale(.78);
  color: var(--text-hint);
  font-weight: 600;
}
.input-field:focus ~ .input-label--raised { color: var(--primary); }
.textarea-field ~ .input-label { top: 22px; transform: translateY(-50%); }
.textarea-field:focus ~ .input-label,
.textarea-field:not(:placeholder-shown) ~ .input-label {
  top: 9px;
  transform: translateY(0) scale(.78);
  color: var(--primary);
  font-weight: 600;
}

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.btn-primary {
  background: var(--primary);
  color: #fff;
  padding: 12px 28px;
  border-radius: var(--radius-xl);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(255,121,121,.35);
  transition: transform .12s ease;
  margin-top: 8px;
}
.btn-primary:active { transform: scale(.95); }
.btn-submit {
  width: 100%;
  height: 52px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(255,121,121,.35);
  transition: transform .12s ease, box-shadow .12s ease;
  margin-top: 8px;
}
.btn-submit:active {
  transform: scale(.98);
  box-shadow: 0 2px 8px rgba(255,121,121,.25);
}

/* ══════════════════════════════════════════
   DIALOG
══════════════════════════════════════════ */
.dialog-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn .18s ease;
}
.dialog {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px 24px 20px;
  width: 100%;
  max-width: 300px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: scaleIn .18s ease;
}
.dialog-icon { font-size: 42px; margin-bottom: 12px; }
.dialog-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.dialog-body { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 20px; }
.dialog-actions { display: flex; gap: 10px; }
.dialog-btn {
  flex: 1;
  height: 44px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  transition: transform .12s ease;
}
.dialog-btn:active { transform: scale(.96); }
.dialog-btn--cancel {
  background: var(--bg);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}
.dialog-btn--confirm {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255,121,121,.3);
}

/* ══════════════════════════════════════════
   SNACKBAR
══════════════════════════════════════════ */
.snackbar {
  position: absolute;
  bottom: calc(var(--nav-h) + 76px);
  left: 16px; right: 16px;
  background: #1a1a2e;
  color: #fff;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  z-index: 600;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  opacity: 0;
  transition: all .28s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
  text-align: center;
}
.snackbar.show {
  transform: translateY(0);
  opacity: 1;
}

/* ══════════════════════════════════════════
   MISC
══════════════════════════════════════════ */
.bottom-spacer { height: 80px; }

/* ── Animations ── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { transform: scale(.88); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes slideUp { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.log-tile, .reminder-tile, .pet-card, .stat-card {
  animation: slideUp .22s ease both;
}

/* ── Health badge ── */
.health-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fce4ec;
  color: #c62828;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  margin-top: 4px;
}
.health-dot { width: 6px; height: 6px; border-radius: 50%; background: #c62828; }

/* ── Ripple on tiles ── */
.log-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,121,121,.12) 0%, transparent 70%);
  opacity: 0;
  transition: opacity .3s ease;
}
.log-tile:active::after { opacity: 1; }

/* ── Skeleton loader ── */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Scrollbar for desktop preview ── */
@media (min-width: 431px) {
  #app { border-radius: 40px; margin: 20px auto; height: calc(100vh - 40px); }
}
