/* ================================================================
   shelter-kz — Design System
   ================================================================ */

:root {
  --bg: #f5f3f0;
  --surface: #ffffff;
  --text: #1c1a18;
  --text-secondary: #4a4540;
  --text-muted: #8a8078;
  --accent: #E05C2A;
  --accent-hover: #c44e22;
  --accent-light: #fff3ee;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --warning: #d97706;
  --warning-light: #fffbeb;
  --success: #16a34a;
  --success-light: #f0fdf4;
  --border: #e5e0da;
  --border-light: #f0ece8;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.14);
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;
  --transition: 0.2s ease;
  --header-h: 64px;
}

[data-theme="dark"] {
  --bg: #141210;
  --surface: #1e1c1a;
  --text: #f5f3f0;
  --text-secondary: #c0b8b0;
  --text-muted: #6a6260;
  --accent: #f06d3a;
  --accent-hover: #e05c2a;
  --accent-light: #2a1a12;
  --danger: #ef4444;
  --danger-light: #2a1212;
  --warning: #f59e0b;
  --warning-light: #1f1507;
  --success: #22c55e;
  --success-light: #0a2012;
  --border: #2a2825;
  --border-light: #221e1c;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }
main { flex: 1; }

/* ── Container ── */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  height: var(--header-h);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}
.logo-kz { color: var(--accent); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  background: var(--border-light);
  color: var(--text);
}
.nav-link--urgent { color: var(--danger); font-weight: 600; }
.nav-link--urgent:hover, .nav-link--urgent.active {
  background: var(--danger-light);
  color: var(--danger);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.lang-switch { display: flex; gap: 4px; }
.lang-btn {
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: var(--transition);
}
.lang-btn.active {
  background: var(--accent);
  color: white;
}
.lang-btn:hover:not(.active) {
  background: var(--border-light);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.theme-toggle:hover { background: var(--border-light); color: var(--text); }
[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 36px; height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text);
}
.mobile-menu-btn span {
  display: block;
  width: 20px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.mobile-menu-btn.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-btn.is-open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 12px 0;
}
.mobile-nav.is-open { display: flex; }
.mobile-nav-link {
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background var(--transition);
}
.mobile-nav-link:hover { background: var(--border-light); color: var(--text); }
.mobile-nav-link--urgent { color: var(--danger); }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 64px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1rem;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 12px;
}
.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--accent); }
.footer-desc { color: var(--text-secondary); font-size: 0.875rem; }
.footer-copy { color: var(--text-muted); font-size: 0.8rem; }
@media (max-width: 640px) {
  .footer-top { flex-direction: column; gap: 12px; }
  .footer-links { justify-content: center; }
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform 0.1s;
  white-space: nowrap;
  border: 2px solid transparent;
}
.btn:active { transform: scale(0.98); }

.btn--primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: var(--shadow-md); }

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

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

.btn--danger {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}
.btn--danger:hover { background: #b91c1c; }

.btn--sm { padding: 7px 14px; font-size: 0.8rem; }
.btn--lg { padding: 13px 28px; font-size: 1rem; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge--success { background: var(--success-light); color: var(--success); }
.badge--warning { background: var(--warning-light); color: var(--warning); }
.badge--info { background: #eff6ff; color: #2563eb; }
.badge--danger { background: var(--danger-light); color: var(--danger); }

/* ── Timer Badge ── */
.timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.timer-green { background: var(--success-light); color: var(--success); }
.timer-orange { background: var(--warning-light); color: var(--warning); }
.timer-red { background: var(--danger-light); color: var(--danger); animation: pulse 1s ease-in-out infinite; }
.timer-badge--lg { font-size: 1rem; padding: 8px 16px; }
.timer-badge--xl { font-size: 1.1rem; padding: 10px 18px; }

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

/* ── Pulse dot ── */
.pulse-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--danger);
  animation: pulse-dot 1.5s ease-in-out infinite;
}
.pulse-dot--lg { width: 12px; height: 12px; }
.pulse-dot--xl { width: 16px; height: 16px; }
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

/* ── Chips ── */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip--active { background: var(--accent); color: white; border-color: var(--accent); }
.chip--danger.chip--active { background: var(--danger); border-color: var(--danger); }

/* ── Hero Banner ── */
.hero-banner {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
}
.hero-stat-number--success { color: var(--success); }
.hero-stat-number--danger { color: var(--danger); }
.hero-stat-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; text-align: center; }
.hero-stat-div { width: 1px; height: 40px; background: var(--border); }
.hero-urgent-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 16px;
  background: var(--danger-light);
  border-radius: var(--radius-sm);
  border: 1px solid #fca5a5;
  font-size: 0.875rem;
  color: var(--danger);
  flex-wrap: wrap;
}
.hero-urgent-link { color: var(--danger); font-weight: 700; text-decoration: underline; }

/* ── Filters ── */
.filters-section {
  padding: 16px 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--header-h);
  z-index: 50;
}
.filters-form {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}
.filter-group { display: flex; flex-direction: column; gap: 6px; }
.filter-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-select {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.875rem;
  cursor: pointer;
  min-width: 140px;
}
.filter-select:focus { outline: none; border-color: var(--accent); }

/* ── Section Header ── */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  padding-top: 32px;
}
.section-title { font-size: 1.5rem; font-weight: 700; }
.section-count { font-size: 0.875rem; color: var(--text-muted); font-weight: 500; }

.page-header { padding: 40px 0 24px; }
.page-title { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.page-subtitle { color: var(--text-secondary); font-size: 1rem; margin-bottom: 16px; }

/* ── Animals Grid ── */
.animals-section { padding-bottom: 48px; }
.animals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.animals-grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ── Animal Card ── */
.animal-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
}
.animal-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.animal-card--urgent { border-color: var(--danger); }
.animal-card--urgent:hover { box-shadow: 0 4px 16px rgba(220, 38, 38, 0.25); }
.animal-card-link { display: flex; flex-direction: column; flex: 1; }

.animal-photo {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--border-light);
}
.animal-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.animal-card:hover .animal-photo img { transform: scale(1.04); }
.animal-photo-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border-light);
}
.animal-photo-placeholder--sm { min-height: 160px; }

.urgent-badge {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--danger);
  color: white;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.urgent-badge--big { font-size: 0.8rem; padding: 5px 12px; }
.reserved-badge {
  position: absolute;
  top: 10px; right: 10px;
  background: var(--warning);
  color: white;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
}

.animal-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.animal-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.animal-name { font-size: 1.05rem; font-weight: 700; }
.animal-species-badge { font-size: 1.2rem; }
.animal-meta { font-size: 0.8rem; color: var(--text-muted); }
.animal-badges { display: flex; gap: 4px; flex-wrap: wrap; }
.animal-shelter {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: auto;
}
.animal-adopt-btn { margin: 0 16px 16px; }

/* ── Pagination ── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding-top: 32px;
}
.pagination-btn {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
  background: var(--surface);
  transition: all var(--transition);
}
.pagination-btn:hover { border-color: var(--accent); color: var(--accent); }
.pagination-info { color: var(--text-muted); font-size: 0.875rem; }

/* ── Empty State ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 64px 20px;
  text-align: center;
  color: var(--text-secondary);
}
.empty-state h3 { font-size: 1.25rem; font-weight: 700; color: var(--text); }
.empty-state a { color: var(--accent); font-weight: 600; }

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span:not([aria-current]) { opacity: 0.5; }

/* ── Animal Detail Page ── */
.animal-page { padding-bottom: 64px; }
.animal-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding-top: 24px;
}

.animal-gallery { position: sticky; top: calc(var(--header-h) + 20px); align-self: start; }
.gallery-main {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--border-light);
}
.gallery-main-img { width: 100%; height: 100%; object-fit: cover; }
.gallery-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-urgent-badge {
  position: absolute;
  bottom: 16px; left: 16px;
  background: var(--danger);
  color: white;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}
.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
}
.gallery-thumb {
  width: 72px; height: 72px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity var(--transition), border-color var(--transition);
}
.gallery-thumb:hover, .gallery-thumb--active { opacity: 1; border-color: var(--accent); }

.animal-info { display: flex; flex-direction: column; gap: 20px; }
.animal-info-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.animal-detail-name { font-size: 2rem; font-weight: 800; }
.animal-detail-meta { color: var(--text-secondary); margin-top: 4px; }
.animal-badges--lg { display: flex; gap: 6px; flex-wrap: wrap; }
.animal-section { border-top: 1px solid var(--border-light); padding-top: 16px; }
.animal-section-title { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 8px; }
.animal-character, .animal-description, .animal-health-notes { color: var(--text-secondary); line-height: 1.7; }
.animal-shelter-info a { color: var(--accent); }
.animal-intake-date { font-size: 0.8rem; color: var(--text-muted); }
.animal-cta { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 8px; }
.similar-section { margin-top: 48px; }

/* ── Swipe Page ── */
.swipe-page { min-height: calc(100vh - var(--header-h)); }
.swipe-header {
  text-align: center;
  padding: 32px 0 16px;
}
.swipe-title { font-size: 1.75rem; font-weight: 800; margin-bottom: 8px; }
.swipe-subtitle { color: var(--text-secondary); margin-bottom: 16px; }
.swipe-filter-chips { display: flex; justify-content: center; gap: 8px; }

.swipe-arena {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0 40px;
  min-height: 500px;
  position: relative;
}
.swipe-stack {
  position: relative;
  width: 380px;
  height: 540px;
}
.swipe-card {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  cursor: grab;
  user-select: none;
  transition: box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.swipe-card:active { cursor: grabbing; }
.swipe-card.is-gone { pointer-events: none; }

.swipe-card-photo {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: var(--border-light);
}
.swipe-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.swipe-card-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.swipe-card-emoji { font-size: 5rem; }
.swipe-urgent-ribbon {
  position: absolute;
  top: 0; left: 0; right: 0;
  background: var(--danger);
  color: white;
  text-align: center;
  padding: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.swipe-card-info {
  padding: 16px;
  background: var(--surface);
}
.swipe-card-main { margin-bottom: 10px; }
.swipe-card-name { font-size: 1.3rem; font-weight: 800; }
.swipe-card-meta { color: var(--text-secondary); font-size: 0.875rem; margin-bottom: 4px; }
.swipe-card-character { color: var(--text-muted); font-size: 0.8rem; line-height: 1.5; margin-bottom: 8px; }
.swipe-card-badges { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.swipe-card-shelter {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.swipe-controls {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 24px;
}
.swipe-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition);
}
.swipe-btn--skip {
  width: 60px; height: 60px;
  background: var(--surface);
  color: var(--danger);
  box-shadow: var(--shadow-md);
  border: 2px solid var(--border);
}
.swipe-btn--skip:hover { background: var(--danger-light); border-color: var(--danger); transform: scale(1.05); }
.swipe-btn--like {
  width: 72px; height: 72px;
  background: var(--accent);
  color: white;
  box-shadow: var(--shadow-lg);
}
.swipe-btn--like:hover { background: var(--accent-hover); transform: scale(1.08); }
.swipe-btn--reset {
  width: 44px; height: 44px;
  background: var(--surface);
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--border);
}
.swipe-btn--reset:hover { color: var(--accent); border-color: var(--accent); }
.swipe-counter {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Swipe labels */
.swipe-label {
  position: absolute;
  top: 40px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.swipe-label--like { left: 20px; background: var(--accent); color: white; }
.swipe-label--skip { right: 20px; background: var(--danger); color: white; }

/* Swipe Popup */
.swipe-popup {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  max-width: 340px;
  width: calc(100% - 40px);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
}
.swipe-popup.is-visible {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}
.swipe-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 190;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.swipe-popup-overlay.is-visible { opacity: 1; pointer-events: all; }
.swipe-popup-emoji { font-size: 3rem; margin-bottom: 12px; }
.swipe-popup-title { font-size: 1.25rem; font-weight: 800; margin-bottom: 4px; }
.swipe-popup-animal { color: var(--text-secondary); margin-bottom: 20px; }
.swipe-popup-actions { display: flex; flex-direction: column; gap: 10px; }

/* ── Urgent Page ── */
.urgent-hero {
  background: linear-gradient(135deg, #fff1f1, #fef2f2);
  border-bottom: 1px solid #fca5a5;
  padding: 32px 0;
}
[data-theme="dark"] .urgent-hero {
  background: linear-gradient(135deg, #2a0a0a, #200808);
  border-bottom-color: #7f1d1d;
}
.urgent-hero-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}
.urgent-title { font-size: 1.75rem; font-weight: 800; color: var(--danger); }
.urgent-subtitle { color: var(--text-secondary); margin-top: 4px; }
.urgent-page .animals-section, .urgent-page .container { padding-top: 32px; }

/* ── Shelters ── */
.shelters-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding-bottom: 48px;
}
.shelter-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: box-shadow var(--transition);
}
.shelter-card:hover { box-shadow: var(--shadow-md); }
.shelter-card--verified { border-color: var(--accent); }
.shelter-card-header { display: flex; align-items: flex-start; gap: 16px; }
.shelter-icon { flex-shrink: 0; }
.shelter-name {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.verified-badge { color: var(--accent); }
.shelter-city {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}
.shelter-type-badge {
  margin-left: 8px;
  background: var(--border-light);
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}
.shelter-capacity { display: flex; flex-direction: column; gap: 6px; }
.capacity-bar {
  height: 8px;
  background: var(--border-light);
  border-radius: 100px;
  overflow: hidden;
}
.capacity-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 100px;
  transition: width 0.5s ease;
}
.capacity-label { font-size: 0.8rem; color: var(--text-muted); }
.shelter-animal-count { font-size: 0.875rem; color: var(--text-secondary); }
.shelter-address { font-size: 0.85rem; color: var(--text-muted); }
.shelter-contacts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.shelter-contact-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--accent);
}
.shelter-contact-link:hover { text-decoration: underline; }
.shelter-animals-btn { align-self: flex-start; }

/* ── Lost/Found ── */
.lostfound-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 24px 0;
}
.lostfound-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  overflow: hidden;
  position: relative;
  transition: box-shadow var(--transition);
}
.lostfound-card:hover { box-shadow: var(--shadow-md); }
.lostfound-card--lost { border-top: 3px solid var(--danger); }
.lostfound-card--found { border-top: 3px solid var(--success); }
.lostfound-type-badge {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--danger);
  color: white;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
}
.lostfound-type-badge--found { background: var(--success); }
.lostfound-photo {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.lostfound-photo-placeholder {
  width: 100%; height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--danger-light);
  font-size: 3rem;
}
.lostfound-photo-placeholder--found { background: var(--success-light); }
.lostfound-body { padding: 16px; }
.lostfound-title { font-size: 0.95rem; font-weight: 600; margin-bottom: 8px; }
.lostfound-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.lostfound-meta span {
  font-size: 0.75rem;
  background: var(--border-light);
  padding: 2px 8px;
  border-radius: 100px;
  color: var(--text-muted);
}
.lostfound-location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.lostfound-date { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 12px; }
.lostfound-contact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
}
.lostfound-contact a { color: var(--accent); }

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-top: 24px;
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition), border-color var(--transition);
  cursor: pointer;
  background: none;
}
.tab:hover { color: var(--text); }
.tab--active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Report Form ── */
.report-form-section {
  margin-top: 48px;
  padding: 32px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
}

/* ── Adopt Form ── */
.adopt-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  padding-top: 24px;
  padding-bottom: 64px;
}
.adopt-preview {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  align-self: start;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  overflow: hidden;
  padding-bottom: 20px;
}
.adopt-preview-photo {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--border-light);
}
.adopt-preview-photo img { width: 100%; height: 100%; object-fit: cover; }
.adopt-preview-name { font-size: 1.2rem; font-weight: 700; padding: 16px 16px 0; }
.adopt-preview-meta { font-size: 0.875rem; color: var(--text-muted); padding: 4px 16px 0; }
.adopt-preview-shelter {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 8px 16px 0;
}
.adopt-preview .timer-badge { margin: 0 16px; }

.adopt-form-title { font-size: 1.75rem; font-weight: 800; margin-bottom: 6px; }
.adopt-form-subtitle { color: var(--text-secondary); margin-bottom: 24px; }
.adopt-submit-btn { width: 100%; }
.adopt-form-note { font-size: 0.75rem; color: var(--text-muted); text-align: center; margin-top: 8px; }

/* ── Forms ── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-label { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); }
.form-input, .form-select, .form-textarea {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color var(--transition);
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.form-input--lg { padding: 13px 18px; font-size: 1rem; }
.form-textarea { resize: vertical; min-height: 100px; }
.form-fieldset {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 16px;
}
.form-legend {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0 8px;
}
.form-success {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--success-light);
  color: var(--success);
  border-radius: var(--radius-sm);
  font-weight: 600;
  margin-bottom: 16px;
}
.form-error {
  padding: 12px 16px;
  background: var(--danger-light);
  color: var(--danger);
  border-radius: var(--radius-sm);
  font-weight: 500;
  margin-bottom: 16px;
}

/* Radio group */
.radio-group { display: flex; gap: 16px; flex-wrap: wrap; }
.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
}
.radio-label input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; }

.radio-group--cards { flex-direction: row; gap: 12px; margin-bottom: 8px; }
.radio-card { cursor: pointer; flex: 1; min-width: 140px; }
.radio-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  transition: all var(--transition);
}
.radio-card input:checked + .radio-card-inner {
  border-color: var(--accent);
  background: var(--accent-light);
}
.radio-card-icon { font-size: 1.5rem; }
.radio-card-title { font-size: 0.875rem; font-weight: 700; }
.radio-card-desc { font-size: 0.75rem; color: var(--text-muted); }

/* Checkboxes */
.checkboxes-list { display: flex; flex-direction: column; gap: 12px; }
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 0.9rem;
}
.checkbox-label input[type=checkbox] { position: absolute; opacity: 0; width: 0; height: 0; }
.checkbox-custom {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all var(--transition);
  position: relative;
}
.checkbox-label input:checked + .checkbox-custom {
  background: var(--accent);
  border-color: var(--accent);
}
.checkbox-label input:checked + .checkbox-custom::after {
  content: '';
  position: absolute;
  top: 2px; left: 4px;
  width: 6px; height: 9px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

/* ── Dashboard ── */
.dashboard-page { padding-bottom: 64px; }
.dashboard-header {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.dashboard-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.75rem;
  font-weight: 800;
}
.dashboard-subtitle { color: var(--text-secondary); margin-top: 4px; }
.dashboard-updated { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.kpi-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  padding: 20px;
  text-align: center;
  transition: box-shadow var(--transition);
}
.kpi-card:hover { box-shadow: var(--shadow-md); }
.kpi-skeleton { animation: skeleton 1.5s infinite; }
@keyframes skeleton {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.kpi-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
  margin-bottom: 6px;
}
.kpi-value--success { color: var(--success); }
.kpi-value--danger { color: var(--danger); }
.kpi-value--warning { color: var(--warning); }
.kpi-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; line-height: 1.3; }

.charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.chart-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  padding: 24px;
  margin-bottom: 16px;
}
.chart-title { font-size: 1rem; font-weight: 700; margin-bottom: 20px; color: var(--text); }

.table-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  padding: 24px;
}
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dashboard-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.dashboard-table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--border-light);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: nowrap;
}
.dashboard-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
}
.dashboard-table tr:last-child td { border-bottom: none; }
.dashboard-table tr:hover td { background: var(--border-light); }
.table-loading { text-align: center; color: var(--text-muted); padding: 32px; }
.dash-verified { color: var(--accent); }

.mini-bar {
  height: 6px;
  background: var(--border-light);
  border-radius: 100px;
  overflow: hidden;
  width: 80px;
  margin-bottom: 2px;
}
.mini-bar-fill {
  height: 100%;
  border-radius: 100px;
}

/* ── Auth Page ── */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-h) - 180px);
  padding: 40px 20px;
}
.auth-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  padding: 40px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.auth-icon { margin-bottom: 16px; }
.auth-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; }
.auth-subtitle { color: var(--text-secondary); margin-bottom: 24px; font-size: 0.875rem; }
.auth-form { text-align: left; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .animals-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .main-nav { display: none; }
  .mobile-menu-btn { display: flex; }
  .header-inner { gap: 12px; }

  .animals-grid { grid-template-columns: 1fr; }
  .animals-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .shelters-grid { grid-template-columns: 1fr; }
  .lostfound-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .charts-row { grid-template-columns: 1fr; }

  .animal-detail { grid-template-columns: 1fr; }
  .animal-gallery { position: static; }

  .adopt-layout { grid-template-columns: 1fr; }
  .adopt-preview { position: static; }

  .form-row { grid-template-columns: 1fr; }
  .radio-group--cards { flex-direction: column; }

  .swipe-stack { width: calc(100vw - 40px); height: 480px; }

  .hero-stats { gap: 16px; }
  .hero-stat-number { font-size: 1.5rem; }

  .filters-form { gap: 16px; }

  .dashboard-table { font-size: 0.8rem; }

  .adopt-page { overflow: hidden; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .swipe-stack { height: 440px; }
  .animals-grid--4 { grid-template-columns: 1fr; }
}

/* ================================================================
   R2: Share Buttons
   ================================================================ */

.share-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

.share-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.share-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.share-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.share-btn:active { transform: scale(0.97); }

.share-btn--tg:hover { border-color: #2AABEE; color: #2AABEE; background: #e8f7ff; }
[data-theme="dark"] .share-btn--tg:hover { background: #0d2535; }
.share-btn--wa:hover { border-color: #25D366; color: #25D366; background: #eafbf0; }
[data-theme="dark"] .share-btn--wa:hover { background: #072015; }

/* Toast */
.share-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--text);
  color: var(--bg);
  padding: 10px 22px;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  z-index: 2000;
  transition: opacity 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}
.share-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* QR Modal */
.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qr-modal[hidden] { display: none; }
.qr-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}
.qr-modal-content {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px 32px 24px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  min-width: 260px;
  animation: qrFadeIn 0.2s ease;
}
@keyframes qrFadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
.qr-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.qr-modal-close:hover { color: var(--text); background: var(--border-light); }
.qr-modal-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--text);
}
.qr-image {
  width: 200px;
  height: 200px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: block;
  margin: 0 auto;
}
.qr-modal-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 12px;
}

/* ================================================================
   R2: Urgent Card Share Buttons
   ================================================================ */

.animal-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 16px 16px;
}

.animal-card-footer .animal-adopt-btn {
  margin: 0;
  flex: 1;
}

.card-share-btns {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.card-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  flex-shrink: 0;
}
.card-share-btn:hover { transform: translateY(-1px); }
.card-share-btn--tg:hover { border-color: #2AABEE; color: #2AABEE; background: #e8f7ff; }
[data-theme="dark"] .card-share-btn--tg:hover { background: #0d2535; }
.card-share-btn--wa:hover { border-color: #25D366; color: #25D366; background: #eafbf0; }
[data-theme="dark"] .card-share-btn--wa:hover { background: #072015; }

/* ================================================================
   R2: PWA Install Banner
   ================================================================ */

.pwa-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1200;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
  padding: 14px 16px;
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
}
.pwa-banner--visible {
  transform: translateY(0);
}
.pwa-banner-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
}
.pwa-banner-icon {
  flex-shrink: 0;
}
.pwa-banner-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.pwa-banner-text strong {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pwa-banner-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pwa-banner-install {
  flex-shrink: 0;
  white-space: nowrap;
}
.pwa-banner-dismiss {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.pwa-banner-dismiss:hover {
  background: var(--border-light);
  color: var(--text);
}

@media (max-width: 400px) {
  .share-btn span { display: none; }
  .share-btn { padding: 8px 10px; }
  .pwa-banner-text span { display: none; }
}

/* ================================================================
   R5: AI Match Quiz
   ================================================================ */

.match-quiz-overlay {
  position: fixed;
  inset: 0;
  z-index: 1400;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.match-quiz-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.match-quiz {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  z-index: 1450;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 32px 28px 28px;
  max-width: 440px;
  width: calc(100vw - 32px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.match-quiz.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.match-quiz-header { text-align: center; margin-bottom: 24px; }
.match-quiz-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text);
}
.match-quiz-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.match-question {
  margin-bottom: 20px;
}
.match-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.match-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.match-option {
  flex: 1;
  min-width: 0;
  position: relative;
  cursor: pointer;
}
.match-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.match-option-text {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.15s ease;
  text-align: center;
  white-space: nowrap;
}
.match-option:hover .match-option-text {
  border-color: var(--accent);
  color: var(--accent);
}
.match-option.is-selected .match-option-text,
.match-option input:checked + .match-option-text {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(224,92,42,0.25);
}

.match-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}
.match-submit-btn {
  flex: 1;
}
.match-skip-btn {
  flex-shrink: 0;
}

/* Match score badge on cards */
.match-score-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(224,92,42,0.92);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
}

/* Match result banner */
.match-result-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 20px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent) 0%, #f4845f 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  animation: matchBannerIn 0.4s ease;
}
.match-result-banner.is-fading {
  opacity: 0;
  transition: opacity 0.5s ease;
}
.match-result-count {
  background: rgba(255,255,255,0.25);
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 0.8rem;
}
@keyframes matchBannerIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .match-quiz { padding: 24px 20px 20px; }
  .match-options { flex-direction: column; }
  .match-option { min-width: 100%; }
}

/* ================================================================
   R6: Match Analytics Dashboard
   ================================================================ */

.dashboard-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.dashboard-nav {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  margin-bottom: 4px;
}
.dashboard-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  background: var(--surface);
  transition: all 0.15s ease;
  text-decoration: none;
}
.dashboard-nav-item:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}
.dashboard-nav-item.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.charts-row--3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.kpi-value--accent { color: var(--accent); }

/* Top liked animals table */
.top-animal-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.top-animal-thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.top-animal-emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 1.3rem;
  flex-shrink: 0;
}

.temp-tags {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.like-count {
  font-weight: 700;
  color: var(--accent);
}

/* Insight box */
.insight-box {
  margin-top: 24px;
  padding: 24px 28px;
  background: linear-gradient(135deg, #fff8f0 0%, #fff4eb 100%);
  border: 1.5px solid #f0d4bf;
  border-radius: var(--radius-lg);
}
[data-theme="dark"] .insight-box {
  background: linear-gradient(135deg, #1c1510 0%, #201812 100%);
  border-color: #3d2e20;
}
.insight-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--text);
}
.insight-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.insight-list li {
  padding: 8px 14px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  border: 1px solid var(--border-light);
}

.btn--outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}
.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn--sm { padding: 6px 12px; font-size: 0.78rem; }

@media (max-width: 768px) {
  .charts-row--3 { grid-template-columns: 1fr; }
  .dashboard-header-top { flex-direction: column; align-items: flex-start; }
}

/* Photo upload in lost/found form */
.photo-upload-area {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  overflow: hidden;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-upload-area:hover,
.photo-upload-area--dragover {
  border-color: var(--accent);
  background: var(--accent-light);
}
.photo-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.photo-upload-placeholder svg {
  opacity: 0.5;
}
.photo-upload-preview {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 10px;
}
.photo-upload-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ================================================================
   NEW PAGES — guide.html + donate.html
   ================================================================ */

/* ── Shared btn--accent & nav-donate ── */
.btn--accent {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.btn--accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: var(--shadow-md); }

.nav-donate-btn {
  padding: 6px 14px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.mobile-nav-link--donate {
  color: var(--accent);
  font-weight: 600;
}

/* ── Shared section layout ── */
.guide-section, .donate-form-section, .donate-kaspi-section,
.donate-sponsor-section, .donate-campaigns-section, .donate-monthly-section,
.donate-calc-section, .donate-transparency-section, .donate-leaders-section,
.donate-badges-section, .donate-final-cta {
  padding: 64px 0;
}
.guide-section--alt { background: var(--bg); }

.section-header { text-align: center; margin-bottom: 40px; }
.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

/* ── text helpers ── */
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }

/* ================================================================
   GUIDE PAGE
   ================================================================ */

/* ── Guide Hero ── */
.guide-hero {
  background: linear-gradient(135deg, var(--accent) 0%, #c44e22 100%);
  padding: 64px 0 48px;
  color: white;
}
.guide-hero-inner { text-align: center; }
.guide-hero-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 12px;
}
.guide-hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.guide-hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 500px;
  margin: 0 auto 28px;
}
.guide-hero-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.guide-hero-nav-link {
  padding: 6px 14px;
  background: rgba(255,255,255,0.15);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: white;
  transition: background var(--transition);
  border: 1px solid rgba(255,255,255,0.25);
}
.guide-hero-nav-link:hover { background: rgba(255,255,255,0.28); }

/* ── Guide Steps ── */
.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 680px;
  margin: 0 auto;
}
.guide-step {
  display: flex;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border-light);
  align-items: flex-start;
}
.guide-step--last { border-bottom: none; }
.guide-step-num {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--border-light);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.guide-step-num--accent {
  background: var(--accent);
  color: white;
}
.guide-step-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.guide-step-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.6;
}
.guide-step-body .btn { margin-top: 4px; }

/* ── Requirements ── */
.guide-req-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.guide-req-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}
.guide-req-card--wide { grid-column: 1 / -1; }
.guide-req-icon { font-size: 2rem; margin-bottom: 10px; }
.guide-req-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.guide-req-text { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; }

/* ── Chipping ── */
.guide-chip-badges { margin-bottom: 12px; }
.guide-chip-law-badge {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.guide-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.guide-chip-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}
.guide-chip-card--accent {
  background: var(--accent-light);
  border-color: rgba(224,92,42,0.2);
}
.guide-chip-card-icon { font-size: 2rem; margin-bottom: 10px; }
.guide-chip-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.guide-chip-card-text { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; }
.guide-chip-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}
.guide-chip-link:hover { text-decoration: underline; }

.guide-chip-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.guide-chip-cost, .guide-chip-fines {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}
.guide-chip-sub-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}
.guide-chip-cost-row, .guide-chip-fine-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.875rem;
  gap: 8px;
}
.guide-chip-cost-row:last-child, .guide-chip-fine-row:last-child { border-bottom: none; }
.guide-chip-cost-row strong, .guide-chip-fine-row strong { font-weight: 700; }
.guide-chip-cost-row--free strong { color: var(--success); }
.guide-chip-fine-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 10px;
  line-height: 1.5;
}

/* ── Health ── */
.guide-health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.guide-health-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  text-align: center;
}
.guide-health-icon { font-size: 2.5rem; margin-bottom: 12px; }
.guide-health-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.guide-health-text { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; }

/* ── Events ── */
.guide-events-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.guide-event-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  position: relative;
}
.guide-event-badge {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
}
.guide-event-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.guide-event-desc { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; }
.guide-event-placeholder {
  background: var(--accent-light);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  border: 2px dashed rgba(224,92,42,0.3);
}
.guide-event-placeholder-icon { font-size: 2.5rem; margin-bottom: 12px; }
.guide-event-placeholder-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.guide-event-placeholder-text { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.6; }

/* ── FAQ ── */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
  background: var(--surface);
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  background: none;
  transition: background var(--transition);
}
.faq-question:hover { background: var(--border-light); }
.faq-chevron {
  flex-shrink: 0;
  transition: transform var(--transition);
  color: var(--text-muted);
}
.faq-item--open .faq-chevron { transform: rotate(180deg); }
.faq-answer {
  display: none;
  padding: 0 20px 18px;
}
.faq-item--open .faq-answer { display: block; }
.faq-answer p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; }

/* ── Guide CTA ── */
.guide-cta-section {
  background: var(--text);
  padding: 64px 0;
}
.guide-cta-inner { text-align: center; }
.guide-cta-title {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  color: white;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}
.guide-cta-text { color: rgba(255,255,255,0.7); margin-bottom: 24px; }
.guide-cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ================================================================
   DONATE PAGE
   ================================================================ */

/* ── Donate Hero ── */
.donate-hero {
  background: linear-gradient(150deg, #1c1a18 0%, #2d2016 40%, #E05C2A 100%);
  padding: 72px 0 56px;
  position: relative;
  overflow: hidden;
}
.donate-hero-inner { text-align: center; position: relative; z-index: 1; }
.donate-hero-title {
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 800;
  color: white;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}
.donate-hero-subtitle {
  font-size: 1.25rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 32px;
}
.donate-hero-stats {
  display: flex;
  gap: 40px;
  justify-content: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.donate-hero-stat { text-align: center; }
.donate-hero-stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: white;
  letter-spacing: -0.03em;
}
.donate-hero-stat-label { font-size: 0.8rem; color: rgba(255,255,255,0.6); }
.donate-hero-cta { font-size: 1rem; padding: 14px 32px; }
.donate-hero-paws {
  position: absolute;
  top: 50%;
  right: -20px;
  transform: translateY(-50%);
  font-size: 5rem;
  opacity: 0.07;
  display: flex;
  gap: 12px;
  pointer-events: none;
}

/* ── Donate Form ── */
.donate-form-section { background: var(--bg); }
.donate-form-wrap {
  max-width: 560px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
}
.donate-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.donate-form-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.donate-type-toggle {
  display: flex;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 3px;
}
.donate-type-btn {
  padding: 6px 16px;
  border-radius: calc(var(--radius-sm) - 2px);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.donate-type-btn--active {
  background: var(--accent);
  color: white;
}
.donate-amounts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.donate-amount-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 12px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: var(--surface);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  transition: border-color var(--transition), background var(--transition), transform 0.1s;
  cursor: pointer;
  position: relative;
}
.donate-amount-btn:hover { border-color: var(--accent); background: var(--accent-light); }
.donate-amount-btn--selected { border-color: var(--accent); background: var(--accent-light); }
.donate-amount-btn--popular { border-color: var(--accent); }
.donate-amount-popular-label {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.donate-amount-hint { font-size: 0.7rem; font-weight: 400; color: var(--text-muted); }
.donate-custom-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  padding: 0 12px;
  transition: border-color var(--transition);
}
.donate-custom-row:focus-within { border-color: var(--accent); }
.donate-custom-input {
  flex: 1;
  padding: 10px 0;
  border: none;
  background: transparent;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  outline: none;
}
.donate-custom-input::placeholder { font-weight: 400; color: var(--text-muted); }
.donate-custom-tenge { font-weight: 700; color: var(--text-muted); }
.donate-submit-btn { width: 100%; margin-bottom: 8px; justify-content: center; font-size: 1rem; padding: 14px; }
.donate-secure-note { text-align: center; font-size: 0.8rem; color: var(--text-muted); }

/* ── Kaspi QR ── */
.donate-kaspi-section { background: var(--surface); }
.donate-kaspi-wrap {
  display: flex;
  gap: 48px;
  align-items: center;
  max-width: 760px;
  margin: 0 auto;
}
.donate-kaspi-qr { flex-shrink: 0; }
.donate-qr-placeholder {
  width: 160px; height: 160px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  background: white;
}
.donate-qr-placeholder svg { width: 120px; height: 120px; }
.donate-qr-label { font-size: 0.7rem; font-weight: 700; color: var(--accent); letter-spacing: 0.1em; }
.donate-kaspi-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.donate-kaspi-subtitle { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 16px; }
.donate-kaspi-steps {
  padding-left: 20px;
  margin-bottom: 20px;
}
.donate-kaspi-steps li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  line-height: 1.5;
}
.donate-kaspi-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Sponsor ── */
.donate-sponsor-section { background: var(--bg); }
.donate-sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.donate-sponsor-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: box-shadow var(--transition), transform var(--transition);
}
.donate-sponsor-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.donate-sponsor-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.donate-sponsor-img-placeholder {
  width: 100%;
  height: 160px;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.donate-sponsor-body { padding: 16px; }
.donate-sponsor-name { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.donate-sponsor-meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 10px; }
.donate-sponsor-amount {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 12px;
}
.donate-sponsor-amount span { font-size: 0.8rem; font-weight: 400; color: var(--text-muted); }
.donate-sponsor-benefits {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 500px;
  margin: 0 auto 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}
.donate-sponsor-benefits h3 { font-size: 0.95rem; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.donate-sponsor-benefits ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.donate-sponsor-benefits li { font-size: 0.875rem; color: var(--text-secondary); }
.donate-sponsor-footer { text-align: center; }

/* ── Campaigns ── */
.donate-campaigns-section { background: var(--surface); }
.donate-campaigns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.donate-campaign-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border: 1px solid var(--border-light);
  transition: box-shadow var(--transition);
}
.donate-campaign-card:hover { box-shadow: var(--shadow-md); }
.donate-campaign-emoji { font-size: 2.5rem; flex-shrink: 0; margin-top: 4px; }
.donate-campaign-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.donate-campaign-desc { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 12px; }
.donate-campaign-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.donate-campaign-stat { font-size: 0.8rem; color: var(--text-secondary); }
.donate-campaign-stat strong { color: var(--text); }
.donate-progress-wrap {
  height: 8px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 10px;
}
.donate-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 100px;
  width: var(--progress, 0%);
  transition: width 1s ease;
}
.donate-campaign-bottom { display: flex; justify-content: space-between; align-items: center; }
.donate-campaign-days { font-size: 0.8rem; color: var(--text-muted); }

/* ── Monthly plans ── */
.donate-monthly-section { background: var(--bg); }
.donate-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  max-width: 800px;
  margin: 0 auto 16px;
}
.donate-plan-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--border);
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
  position: relative;
}
.donate-plan-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.donate-plan-card--featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}
.donate-plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 100px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.donate-plan-icon { font-size: 2.5rem; margin-bottom: 10px; }
.donate-plan-name { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.donate-plan-price {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.donate-plan-price span { font-size: 0.9rem; font-weight: 400; color: var(--text-muted); }
.donate-plan-desc { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.5; }
.donate-plans-note { text-align: center; font-size: 0.8rem; color: var(--text-muted); }

/* ── Calculator ── */
.donate-calc-section { background: var(--surface); }
.donate-calc-wrap { max-width: 640px; margin: 0 auto; }
.donate-calc-inner {
  display: flex;
  gap: 40px;
  align-items: center;
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 36px;
  border: 1px solid var(--border-light);
}
.donate-calc-control { flex: 1; }
.donate-calc-label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); display: block; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.08em; }
.donate-calc-value-display {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.donate-calc-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border);
  border-radius: 100px;
  outline: none;
  cursor: pointer;
  margin-bottom: 8px;
}
.donate-calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(224,92,42,0.4);
  border: 2px solid white;
}
.donate-calc-slider::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid white;
}
.donate-calc-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
}
.donate-calc-result { text-align: center; min-width: 180px; }
.donate-calc-equals { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.08em; }
.donate-calc-impact {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.5;
  min-height: 48px;
}

/* ── Transparency ── */
.donate-transparency-section { background: var(--bg); }
.donate-transparency-wrap {
  display: flex;
  gap: 48px;
  align-items: center;
  justify-content: center;
  max-width: 700px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.donate-pie-chart { flex-shrink: 0; width: 180px; height: 180px; }
.donate-pie-chart svg { width: 180px; height: 180px; }
.donate-transparency-legend { flex: 1; min-width: 220px; }
.donate-trans-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.donate-trans-item:last-of-type { border-bottom: none; }
.donate-trans-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.donate-trans-label { flex: 1; font-size: 0.9rem; color: var(--text-secondary); }
.donate-trans-pct { font-weight: 700; font-size: 0.9rem; color: var(--text); }
.donate-transparency-note { font-size: 0.8rem; color: var(--text-muted); margin-top: 12px; line-height: 1.5; }

/* ── Leaderboard ── */
.donate-leaders-section { background: var(--surface); }
.donate-leaders-wrap {
  display: flex;
  gap: 32px;
  max-width: 720px;
  margin: 0 auto;
  align-items: flex-start;
  flex-wrap: wrap;
}
.donate-leaders-table { flex: 1; min-width: 280px; }
.donate-leader-row {
  display: grid;
  grid-template-columns: 40px 32px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.donate-leader-row:hover { background: var(--border-light); }
.donate-leader-row--top { background: var(--accent-light); }
.donate-leader-rank { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }
.donate-leader-medal { font-size: 1.1rem; }
.donate-leader-name { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.donate-leader-amount { font-size: 0.9rem; font-weight: 700; color: var(--accent); }
.donate-leaders-total {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: center;
  color: white;
  min-width: 200px;
}
.donate-leaders-total-num {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}
.donate-leaders-total-label { font-size: 0.85rem; opacity: 0.8; margin-bottom: 4px; }
.donate-leaders-total-sub { font-size: 0.8rem; opacity: 0.6; margin-bottom: 20px; }
.donate-leaders-total .btn--primary {
  background: white;
  color: var(--accent);
  border-color: white;
}
.donate-leaders-total .btn--primary:hover { background: rgba(255,255,255,0.9); }

/* ── Badges ── */
.donate-badges-section { background: var(--bg); }
.donate-badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.donate-badge-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 14px;
  text-align: center;
  border: 2px solid var(--border);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.donate-badge-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.donate-badge-card--special { border-color: var(--accent); background: var(--accent-light); }
.donate-badge-icon { font-size: 2.25rem; margin-bottom: 8px; }
.donate-badge-name { font-size: 0.85rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.donate-badge-desc { font-size: 0.75rem; color: var(--text-muted); }

/* ── Final CTA ── */
.donate-final-cta {
  background: linear-gradient(135deg, var(--accent), #c44e22);
  padding: 64px 0;
}
.donate-final-inner { text-align: center; }
.donate-final-inner h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  color: white;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}
.donate-final-inner .btn--primary {
  background: white;
  color: var(--accent);
  border-color: white;
  font-size: 1rem;
  padding: 14px 32px;
}
.donate-final-inner .btn--primary:hover { background: rgba(255,255,255,0.9); }

/* ================================================================
   RESPONSIVE — Guide & Donate
   ================================================================ */

@media (max-width: 768px) {
  .guide-chip-bottom { grid-template-columns: 1fr; }
  .guide-events-grid { grid-template-columns: 1fr; }
  .donate-kaspi-wrap { flex-direction: column; text-align: center; }
  .donate-kaspi-steps { text-align: left; }
  .donate-kaspi-actions { justify-content: center; }
  .donate-calc-inner { flex-direction: column; gap: 24px; text-align: center; }
  .donate-leaders-wrap { flex-direction: column; }
  .donate-leaders-total { width: 100%; }
  .donate-hero-paws { display: none; }
  .donate-form-header { flex-direction: column; align-items: flex-start; }
  .section-title { font-size: 1.4rem; }
  .donate-campaigns-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .guide-req-grid { grid-template-columns: 1fr; }
  .guide-req-card--wide { grid-column: 1; }
  .guide-health-grid { grid-template-columns: 1fr; }
  .donate-amounts { grid-template-columns: 1fr 1fr; }
  .donate-plans-grid { grid-template-columns: 1fr; }
  .donate-badges-grid { grid-template-columns: repeat(2, 1fr); }
  .donate-campaigns-grid { grid-template-columns: 1fr; }
  .donate-campaign-card { flex-direction: column; }
  .guide-section, .donate-form-section, .donate-kaspi-section,
  .donate-sponsor-section, .donate-campaigns-section, .donate-monthly-section,
  .donate-calc-section, .donate-transparency-section, .donate-leaders-section,
  .donate-badges-section, .donate-final-cta { padding: 40px 0; }
}

/* ===== Wave 1: Favorites ===== */
.fav-btn {
  position: absolute; top: 12px; right: 12px; z-index: 10;
  background: rgba(255,255,255,0.85); border: none; border-radius: 50%;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s; color: var(--text-muted);
  backdrop-filter: blur(4px);
}
.fav-btn:hover { background: rgba(255,255,255,1); color: var(--danger); transform: scale(1.1); }
.fav-btn--active { color: var(--danger); }
.fav-btn--active svg { fill: var(--danger); }
.animal-card { position: relative; }

.share-mini-btn {
  position: absolute; top: 12px; right: 56px; z-index: 10;
  background: rgba(255,255,255,0.85); border: none; border-radius: 50%;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s; color: var(--text-muted);
  backdrop-filter: blur(4px);
}
.share-mini-btn:hover { background: rgba(255,255,255,1); color: var(--accent); transform: scale(1.1); }

.fav-count {
  background: var(--danger); color: #fff; border-radius: 10px;
  font-size: 11px; padding: 1px 6px; margin-left: 4px; font-weight: 700;
  vertical-align: middle;
}

.favorites-loading { text-align: center; padding: 60px 0; }
.favorites-section { padding: 40px 0; min-height: 400px; }

/* ===== Wave 1: Success Stories ===== */
.success-section {
  padding: 48px 0; background: var(--bg);
  border-top: 1px solid var(--border-light);
}
.success-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px; margin-top: 24px;
}
.success-card {
  border-radius: var(--radius); overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.success-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.success-photo { position: relative; aspect-ratio: 1; overflow: hidden; }
.success-photo img { width: 100%; height: 100%; object-fit: cover; }
.success-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.5), transparent 50%);
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 10px;
}
.success-badge {
  background: var(--success); color: #fff; padding: 3px 12px;
  border-radius: 20px; font-size: 12px; font-weight: 700; letter-spacing: 0.5px;
}
.success-body { padding: 10px 12px; }
.success-name { font-size: 15px; font-weight: 700; margin: 0; }
.success-meta { font-size: 12px; color: var(--text-muted); margin: 2px 0 0; }

.section-subtitle {
  color: var(--text-secondary); font-size: 15px; margin-top: 4px;
}

/* ===== Wave 1: Video ===== */
.animal-video-wrapper {
  position: relative; width: 100%; padding-bottom: 56.25%;
  border-radius: var(--radius); overflow: hidden; background: #000;
  margin-top: 8px;
}
.animal-video-iframe, .animal-video {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  border: none;
}

/* ===== Wave 1: Fav Count Badge (nav) ===== */
.fav-count-badge {
  background: var(--danger); color: #fff; border-radius: 10px;
  font-size: 10px; padding: 1px 5px; margin-left: 3px; font-weight: 700;
  vertical-align: middle; display: inline-block;
}
.nav-link--fav { display: inline-flex; align-items: center; gap: 4px; }

/* Spinner for loading states */
.spinner {
  width: 36px; height: 36px; border: 3px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.7s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Dark mode adjustments for overlay buttons */
[data-theme="dark"] .fav-btn { background: rgba(30,28,26,0.8); }
[data-theme="dark"] .fav-btn:hover { background: rgba(30,28,26,1); }
[data-theme="dark"] .share-mini-btn { background: rgba(30,28,26,0.8); }
[data-theme="dark"] .share-mini-btn:hover { background: rgba(30,28,26,1); }
.success-photo-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center;
  justify-content: center; background: var(--border-light);
  font-size: 2.5rem;
}

/* ===== Wave 1: Extended Filters ===== */
.filters-form {
  display: flex; flex-wrap: wrap; gap: 12px 24px;
  align-items: flex-start;
}
