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

:root {
  --bg: #fffaf6;
  --surface: #ffffff;
  --surface-soft: #fcebf0;
  --surface-sage: #edf5ee;
  --surface-lavender: #f0edf8;
  --surface-butter: #fff3d8;
  --surface-sky: #eaf4f7;
  --primary: #cf7f98;
  --primary-dark: #795165;
  --accent: #6f8f79;
  --accent-soft: #dceadf;
  --lavender: #8d82b8;
  --peach: #c98f67;
  --sky: #6f9eac;
  --text: #4b3d42;
  --text-muted: #796c70;
  --border: #ead1d8;
  --border-soft: #f3e4e8;
  --shadow: 0 18px 45px rgba(102, 77, 88, 0.1);
  --shadow-soft: 0 10px 28px rgba(102, 77, 88, 0.07);
  --status-available: #628f6b;
  --status-adopted: #b9825d;
  --status-in-treatment: #7c79ad;
  --status-reserved: #b46f81;
  --font-body: "Nunito", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Quicksand", "Nunito", ui-sans-serif, system-ui, sans-serif;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  background: var(--bg);
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(252, 235, 240, 0.68), rgba(255, 243, 216, 0.24) 230px, rgba(255, 250, 246, 0) 390px),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("/images/paw-small.svg");
  background-size: 92px 92px;
  background-position: 18px 18px;
  opacity: 0.055;
  animation: backgroundDrift 28s linear infinite;
}

img {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.page-stack {
  display: grid;
  gap: 2rem;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(242, 201, 215, 0.75);
  background: rgba(255, 250, 247, 0.9);
  backdrop-filter: blur(18px);
}

.navbar .container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms var(--ease-out), color 180ms var(--ease-out);
}

.logo:hover {
  transform: translateY(-1px) rotate(-1deg);
}

.logo-image {
  width: 58px;
  height: 58px;
  padding: 5px;
  object-fit: contain;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 220ms var(--ease-spring), box-shadow 220ms var(--ease-out);
}

.logo:hover .logo-image {
  transform: scale(1.035) rotate(2deg);
  box-shadow: var(--shadow);
}

.logo-text {
  font-size: 1.05rem;
  font-family: var(--font-display);
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
}

.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  overflow: hidden;
  transition: background-color 0.2s, color 0.2s, transform 180ms var(--ease-out);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.35rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms var(--ease-out);
}

.nav-links a:hover {
  transform: translateY(-1px);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-links a::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  mask: var(--nav-icon) center / contain no-repeat;
}

.nav-links li:first-child a {
  --nav-icon: url("/images/icon-home.svg");
}

.nav-links li:nth-child(2) a {
  --nav-icon: url("/images/icon-heart.svg");
}

.nav-links li:last-child a {
  --nav-icon: url("/images/icon-list.svg");
}

.nav-links a:hover {
  color: var(--primary-dark);
  background: var(--surface-soft);
}

.nav-decoration {
  width: 44px;
  height: 44px;
  opacity: 0.85;
}

main {
  min-height: calc(100vh - 176px);
  padding: 3rem 0;
}

.footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border-soft);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.65);
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.footer p {
  margin: 0;
}

.footer-decoration {
  width: 34px;
  height: 34px;
  opacity: 0.75;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.4rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.section-kicker::before {
  content: "";
  width: 18px;
  height: 18px;
  background: currentColor;
  mask: url("/images/icon-sparkle.svg") center / contain no-repeat;
}

h1,
h2,
h3 {
  color: var(--primary-dark);
  font-family: var(--font-display);
  line-height: 1.1;
}

h1 {
  font-size: clamp(2.05rem, 4.3vw, 3.75rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.25rem, 1.8vw, 1.75rem);
  font-weight: 700;
}

h3 {
  font-size: 1.08rem;
  font-weight: 700;
}

p {
  margin-bottom: 1rem;
}

.catalog-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-soft);
  animation: fadeLift 520ms var(--ease-out) both;
}

.hero-copy {
  max-width: 720px;
}

.hero-text {
  max-width: 620px;
  margin: 1rem 0 0;
  color: var(--text-muted);
  font-size: 1.06rem;
}

.catalog-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(88px, 1fr));
  gap: 0.75rem;
}

.catalog-tools {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-soft);
  animation: fadeLift 520ms var(--ease-out) 90ms both;
}

.search-field {
  display: grid;
  gap: 0.35rem;
}

.search-field label {
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 700;
}

.search-field input,
.admin-list-tools input,
.admin-list-tools select {
  width: 100%;
  min-height: 42px;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: #fff;
  font: inherit;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-chip {
  min-height: 38px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  color: var(--text-muted);
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  transition: color 180ms var(--ease-out), background-color 180ms var(--ease-out), border-color 180ms var(--ease-out), transform 160ms var(--ease-out), box-shadow 180ms var(--ease-out);
}

.filter-chip:hover {
  transform: translateY(-1px);
  border-color: var(--border);
  box-shadow: var(--shadow-soft);
}

.filter-chip:active {
  transform: translateY(1px) scale(0.98);
}

.filter-chip.active {
  color: var(--primary-dark);
  border-color: var(--border);
  background: var(--surface-soft);
  animation: softPop 220ms var(--ease-spring);
}

.stat-pill {
  min-width: 96px;
  padding: 0.85rem;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-soft);
  text-align: center;
  animation: fadeLift 520ms var(--ease-out) both;
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}

.stat-pill:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stat-pill:nth-child(1) {
  animation-delay: 80ms;
}

.stat-pill:nth-child(2) {
  animation-delay: 150ms;
}

.stat-pill:nth-child(3) {
  animation-delay: 220ms;
}

.stat-pill span {
  display: block;
  color: var(--primary-dark);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.stat-pill small {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.stat-pill:nth-child(1) {
  border-color: #eadbb4;
  background: var(--surface-butter);
}

.stat-pill:nth-child(2) {
  border-color: var(--accent-soft);
  background: var(--surface-sage);
}

.stat-pill:nth-child(3) {
  border-color: #ddd7ef;
  background: var(--surface-lavender);
}

.dogs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.dog-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  animation: cardIn 560ms var(--ease-spring) both;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--ease-out);
}

.dog-card:nth-child(2) {
  animation-delay: 70ms;
}

.dog-card:nth-child(3) {
  animation-delay: 140ms;
}

.dog-card:nth-child(4) {
  animation-delay: 210ms;
}

.dog-card:nth-child(n + 5) {
  animation-delay: 280ms;
}

.dog-card::before {
  content: "";
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
  width: 42px;
  height: 42px;
  background: url("/images/paw-small.svg") center / contain no-repeat;
  filter: drop-shadow(0 7px 12px rgba(102, 77, 88, 0.12));
}

.dog-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow);
  transform: translateY(-5px);
}

.dog-image-link {
  display: block;
  overflow: hidden;
  background: var(--surface-soft);
}

.dog-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
  transition: transform 420ms var(--ease-out), filter 420ms var(--ease-out);
}

.dog-card:hover .dog-image {
  filter: saturate(1.08);
  transform: scale(1.045);
}

.dog-info {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.card-heading {
  display: grid;
  gap: 0.8rem;
}

.dog-name {
  margin: 0;
  color: var(--primary-dark);
  font-family: var(--font-display);
  font-size: 1.38rem;
  font-weight: 700;
}

.dog-breed,
.dog-description {
  color: var(--text-muted);
}

.dog-breed {
  margin: 0.2rem 0 0;
  font-weight: 600;
}

.species-label {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.25rem;
  color: var(--lavender);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.species-label::before {
  content: "";
  width: 15px;
  height: 15px;
  background: currentColor;
  mask: url("/images/icon-dog.svg") center / contain no-repeat;
}

.species-cat .species-label {
  color: var(--peach);
}

.species-cat .species-label::before {
  mask-image: url("/images/icon-cat.svg");
}

.dog-description {
  margin: 0;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--accent-soft);
  border-radius: 8px;
  color: var(--accent);
  background: var(--surface-sage);
  font-size: 0.85rem;
  font-weight: 700;
}

.card-meta span::before,
.info-item::before {
  content: "";
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  background: currentColor;
  mask: var(--icon, url("/images/icon-tag.svg")) center / contain no-repeat;
}

.meta-age {
  --icon: url("/images/icon-calendar.svg");
}

.meta-size {
  --icon: url("/images/icon-ruler.svg");
  color: var(--sky) !important;
  border-color: #d5eaf0 !important;
  background: var(--surface-sky) !important;
}

.dog-status {
  position: relative;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.6rem;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  overflow: hidden;
  animation: softPop 260ms var(--ease-spring);
}

.dog-status::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  mask: var(--status-icon) center / contain no-repeat;
}

.status-available {
  --status-icon: url("/images/check-circle.svg");
  color: var(--status-available);
  background: var(--surface-sage);
}

.status-available::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.58) 45%, transparent 72%);
  transform: translateX(-120%);
  animation: statusShimmer 3.8s ease-in-out infinite;
}

.status-adopted {
  --status-icon: url("/images/icon-heart.svg");
  color: var(--status-adopted);
  background: var(--surface-butter);
}

.status-in_treatment {
  --status-icon: url("/images/medical.svg");
  color: var(--status-in-treatment);
  background: var(--surface-lavender);
}

.status-reserved {
  --status-icon: url("/images/clock.svg");
  color: var(--status-reserved);
  background: var(--surface-soft);
}

.btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #fff;
  background: var(--primary);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s, transform 0.2s;
}

.btn::before {
  content: "";
  width: 17px;
  height: 17px;
  background: currentColor;
  mask: var(--btn-icon, url("/images/icon-sparkle.svg")) center / contain no-repeat;
}

.btn:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.btn.is-loading::before {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  background: transparent;
  mask: none;
  animation: spin 700ms linear infinite;
}

.btn-soft,
.btn-secondary {
  border-color: var(--border);
  color: var(--primary-dark);
  background: var(--surface-soft);
}

.btn-soft::before,
.btn-secondary::before {
  filter: none;
}

.btn-soft:hover,
.btn-secondary:hover {
  color: #fff;
  background: var(--primary);
}

.btn-danger {
  background: #a84662;
}

.btn-danger:hover {
  background: #7d314b;
}

.whatsapp-btn {
  background: #2fbf73;
  --btn-icon: url("/images/icon-heart.svg");
}

.whatsapp-btn:hover {
  background: #1f8f56;
}

.btn:focus-visible,
.nav-links a:focus-visible,
.logo:focus-visible,
.form-group input:focus-visible,
.form-group select:focus-visible,
.form-group textarea:focus-visible {
  outline: 3px solid rgba(232, 105, 151, 0.28);
  outline-offset: 3px;
}

.dog-detail {
  display: grid;
  gap: 2rem;
}

.dog-detail-header {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 2rem;
  align-items: start;
}

.pet-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 0.75rem;
  align-items: start;
  min-width: 0;
  animation: fadeLift 520ms var(--ease-out) both;
}

.pet-gallery-main {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-soft);
  box-shadow: var(--shadow-soft);
}

.pet-gallery-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 180ms var(--ease-out), transform 360ms var(--ease-out), filter 360ms var(--ease-out);
}

.pet-gallery-image.is-changing {
  opacity: 0;
  filter: saturate(0.9);
  transform: scale(0.985);
}

.pet-gallery-count {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(64, 49, 56, 0.62);
  backdrop-filter: blur(8px);
}

.pet-gallery-thumbs {
  display: grid;
  gap: 0.55rem;
  max-height: min(68vh, 620px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.pet-gallery-thumbs::-webkit-scrollbar {
  display: none;
}

.pet-gallery-thumb {
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 8px;
  background: var(--surface-soft);
  cursor: pointer;
  box-shadow: none;
  opacity: 0.72;
  transition:
    border-color 160ms ease,
    opacity 160ms ease,
    transform 160ms ease;
}

.pet-gallery-thumb:hover,
.pet-gallery-thumb:focus-visible,
.pet-gallery-thumb.active {
  border-color: var(--primary);
  opacity: 1;
}

.pet-gallery-thumb:focus-visible {
  outline: 3px solid rgba(232, 105, 151, 0.28);
  outline-offset: 2px;
}

.pet-gallery-thumb.active {
  animation: softPop 220ms var(--ease-spring);
  transform: scale(0.96);
}

.pet-gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dog-detail-info {
  position: sticky;
  top: 94px;
  padding: 1.25rem;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
  animation: fadeLift 520ms var(--ease-out) 120ms both;
}

.dog-detail-info h1 {
  margin-bottom: 1rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.info-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.45rem;
  align-items: start;
  padding: 0.75rem;
  border: 1px solid var(--accent-soft);
  border-radius: 8px;
  background: var(--surface-sage);
  transition: border-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out), transform 180ms var(--ease-out);
}

.info-item:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.info-breed {
  --icon: url("/images/icon-tag.svg");
}

.info-age {
  --icon: url("/images/icon-calendar.svg");
  border-color: #eadbb4;
  background: var(--surface-butter);
}

.info-gender {
  --icon: url("/images/icon-gender.svg");
  border-color: #ddd7ef;
  background: var(--surface-lavender);
}

.info-size {
  --icon: url("/images/icon-ruler.svg");
  border-color: #d5eaf0;
  background: var(--surface-sky);
}

.info-vaccine {
  --icon: url("/images/icon-syringe.svg");
}

.info-care {
  --icon: url("/images/icon-heart.svg");
  border-color: var(--border-soft);
  background: var(--surface-soft);
}

.info-item strong {
  display: block;
  grid-column: 2;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.info-item span {
  grid-column: 2;
  color: var(--text);
  font-weight: 700;
}

.detail-content {
  display: grid;
  gap: 1rem;
  max-width: 820px;
}

.detail-section {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-soft);
}

.detail-section p {
  color: var(--text-muted);
}

.soft-list {
  display: grid;
  gap: 0.4rem;
  margin-left: 1.2rem;
  color: var(--text-muted);
}

.contact-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  animation: fadeLift 520ms var(--ease-out) both;
}

.contact-section p:last-child {
  margin-bottom: 0;
}

.adoption-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.adoption-step {
  padding: 1.1rem;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
  transition: border-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out), transform 180ms var(--ease-out);
}

.adoption-step:hover {
  border-color: var(--border);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.adoption-step span {
  display: inline-grid;
  width: 34px;
  height: 34px;
  margin-bottom: 0.8rem;
  place-items: center;
  border-radius: 8px;
  color: var(--primary-dark);
  background: var(--surface-butter);
  font-weight: 700;
  transition: transform 180ms var(--ease-spring);
}

.adoption-step:hover span {
  transform: rotate(-4deg) scale(1.05);
}

.adoption-step p {
  color: var(--text-muted);
}

.back-link {
  margin-top: 0.5rem;
}

.admin-container {
  max-width: 980px;
  margin: 0 auto;
  padding: 1.25rem;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

#login-section {
  display: grid;
  min-height: min(620px, calc(100vh - 240px));
  place-items: center;
  padding: 1.5rem 0;
}

.login-card {
  position: relative;
  width: min(100%, 440px);
  overflow: hidden;
  padding: 2rem;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(252, 235, 240, 0.72), rgba(255, 255, 255, 0.86) 42%),
    #fff;
  box-shadow: var(--shadow);
  text-align: left;
}

.login-card::after {
  content: "";
  position: absolute;
  right: -44px;
  bottom: -42px;
  width: 150px;
  height: 150px;
  background: url("/images/paw.svg") center / contain no-repeat;
  opacity: 0.1;
  pointer-events: none;
}

.login-mark {
  width: 76px;
  height: 76px;
  margin-bottom: 1rem;
  padding: 0.45rem;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.login-card h1 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.8rem, 4vw, 2.45rem);
}

.login-copy {
  max-width: 34ch;
  color: var(--text-muted);
}

.login-card .form-group {
  margin-top: 1.35rem;
}

.login-btn {
  width: 100%;
  margin-top: 1rem;
}

#auth-message:not(:empty) {
  margin-top: 1rem;
}

.admin-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-soft);
}

.admin-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  padding: 0.4rem;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(246, 239, 225, 0.7);
}

.admin-menu-btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.admin-menu-btn::before {
  content: "";
  width: 17px;
  height: 17px;
  background: currentColor;
  mask: var(--menu-icon) center / contain no-repeat;
}

#manage-dogs-tab {
  --menu-icon: url("/images/icon-list.svg");
}

#add-dog-tab {
  --menu-icon: url("/images/icon-plus.svg");
}

.admin-menu-btn.active {
  color: var(--primary-dark);
  border-color: var(--border);
  background: #fff;
  box-shadow: var(--shadow-soft);
  animation: softPop 220ms var(--ease-spring);
}

#dog-form-section,
.admin-list-section {
  animation: fadeLift 320ms var(--ease-out) both;
}

#dog-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.form-group,
.form-group-row {
  margin: 0;
}

.form-group:has(textarea),
.form-group:has(input[type="file"]),
.form-group:has(#healthConditions),
.form-group:has(#images),
.form-actions {
  grid-column: 1 / -1;
}

.form-group label,
.form-group-row label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--primary-dark);
  font-size: 0.88rem;
  font-weight: 700;
}

.form-group-row label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-soft);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.78rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: #fff;
  font: inherit;
  font-size: 0.96rem;
  transition: border-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out), transform 180ms var(--ease-out);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
  border-color: var(--primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.form-group textarea {
  min-height: 118px;
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.admin-list-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-soft);
}

.admin-list-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, auto) minmax(160px, auto);
  gap: 0.65rem;
  margin-top: 1rem;
}

.dogs-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
  list-style: none;
}

.dogs-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: #fff;
  animation: fadeLift 260ms var(--ease-out) both;
  transition: border-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out), transform 180ms var(--ease-out);
}

.dogs-list li:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.dogs-list li > div:first-child {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.dogs-list strong {
  color: var(--primary-dark);
}

.admin-pet-meta {
  color: var(--text-muted);
  font-weight: 750;
}

.admin-empty-row {
  color: var(--text-muted);
  justify-content: center !important;
  text-align: center;
}

.admin-loading-row {
  color: var(--primary-dark);
  justify-content: center !important;
  text-align: center;
}

.admin-loading-row::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid var(--primary);
  border-right-color: transparent;
  border-radius: 999px;
  animation: spin 700ms linear infinite;
}

.dog-actions {
  display: flex;
  gap: 0.5rem;
}

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

.error,
.success {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-weight: 750;
}

.error {
  border: 1px solid #f2b2c0;
  color: #86324c;
  background: #ffe8ee;
}

.success {
  border: 1px solid var(--accent-soft);
  color: #456f50;
  background: var(--surface-sage);
}

.error p,
.success p {
  margin: 0;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1rem;
  animation: fadeIn 160ms var(--ease-out) both;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(75, 61, 66, 0.45);
  animation: fadeIn 160ms var(--ease-out) both;
}

.modal-dialog {
  position: relative;
  width: min(100%, 520px);
  max-height: min(90vh, 640px);
  overflow: auto;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: modalPop 220ms var(--ease-spring) both;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}

.modal-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #86324c;
  background: #ffe8ee;
  border: 1px solid #f2b2c0;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.25;
  color: var(--text);
}

.modal-message {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.modal-details {
  margin: 0 0 1.25rem 1.1rem;
  color: var(--primary-dark);
}

.modal-details li + li {
  margin-top: 0.45rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 1rem;
  padding: 3rem 1rem;
  color: var(--text-muted);
  text-align: center;
}

.empty-state img {
  width: 96px;
  height: 96px;
  animation: gentleFloat 3.4s ease-in-out infinite;
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms var(--ease-out), transform 520ms var(--ease-out);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

@keyframes fadeLift {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
  }
}

@keyframes softPop {
  0% {
    transform: scale(0.96);
  }
  70% {
    transform: scale(1.02);
  }
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
}

@keyframes statusShimmer {
  0%,
  68% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}

@keyframes gentleFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes backgroundDrift {
  to {
    background-position: 110px 110px;
  }
}

@media (max-width: 860px) {
  .catalog-hero,
  .dog-detail-header {
    grid-template-columns: 1fr;
  }

  .catalog-summary {
    width: 100%;
  }

  .dog-detail-info {
    position: static;
  }

  .pet-gallery {
    grid-template-columns: 1fr;
  }

  .pet-gallery-thumbs {
    grid-auto-flow: column;
    grid-auto-columns: clamp(68px, 18vw, 96px);
    grid-template-columns: none;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.2rem;
  }
}

@media (max-width: 680px) {
  .container {
    width: min(100% - 28px, 1120px);
  }

  main {
    padding: 2rem 0;
  }

  .navbar .container {
    flex-wrap: wrap;
  }

  .logo-image {
    width: 50px;
    height: 50px;
  }

  .nav-links {
    width: 100%;
  }

  .nav-links a {
    flex: 1;
    justify-content: center;
  }

  .nav-decoration {
    display: none;
  }

  .catalog-summary,
  .admin-list-tools,
  .adoption-steps,
  .info-grid,
  #dog-form {
    grid-template-columns: 1fr;
  }

  .dogs-grid {
    grid-template-columns: 1fr;
  }

  .pet-gallery {
    gap: 0.6rem;
  }

  .pet-gallery-main {
    border-radius: 8px;
  }

  .pet-gallery-thumbs {
    grid-auto-columns: 64px;
  }

  .contact-section,
  .admin-header,
  .dogs-list li,
  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .dog-actions {
    flex-wrap: wrap;
  }

  .dog-actions .btn,
  .form-actions .btn,
  .contact-section .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
