:root {
  color-scheme: light;
  --paper: #f7f5ef;
  --white: #fffefa;
  --ink: #24382e;
  --muted: #738078;
  --green: #47775e;
  --green-dark: #315640;
  --green-pale: #e6eee6;
  --orange: #ef9d62;
  --line: #e7e5dc;
  --red: #a7483d;
  --shadow: 0 12px 36px rgb(47 62 51 / 7%);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

body { min-width: 320px; margin: 0; background: var(--paper); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
button:disabled:hover { transform: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgb(71 119 94 / 35%);
  outline-offset: 3px;
}

.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(20px, 6vw, 90px);
  border-bottom: 1px solid rgb(36 56 46 / 7%);
  background: var(--paper);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: Manrope, "Segoe UI", sans-serif;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.8px;
  line-height: 1.1;
  text-decoration: none;
}

.brand-mark { font-size: 27px; }
.brand-subtitle { display: block; margin-top: 4px; color: var(--muted); font: 700 9px "DM Sans", sans-serif; letter-spacing: 2px; }
.main-nav { display: flex; align-self: stretch; gap: clamp(12px, 3vw, 42px); }
.tab {
  position: relative;
  padding: 4px 0 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.tab:hover, .tab.active { color: var(--ink); }
.tab.active::after { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--green); content: ""; }

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 19px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--green); color: #fff; box-shadow: 0 5px 13px rgb(49 86 64 / 13%); }
.button-primary:hover { background: var(--green-dark); }
.button-secondary { border-color: var(--line); background: var(--white); color: var(--ink); }
.button-secondary:hover { border-color: #bdcdbf; background: #f4f7f2; }
.button-dark { background: var(--ink); color: white; }
.button-dark:hover { background: #17291f; }
.button-danger { border-color: #f1ddd8; background: #fff8f5; color: var(--red); }
.button-danger:hover { background: #fff0eb; }
.button-small { min-height: 36px; padding: 0 12px; font-size: 12px; }
.header-cta { min-height: 40px; padding-inline: 15px; }
#open-add-pet-mobile { display: none; }

main { max-width: 1240px; margin: 0 auto; padding: 0 clamp(20px, 6vw, 72px) 80px; }
.hero {
  position: relative;
  display: flex;
  min-height: 395px;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  margin: 35px 0 83px;
  padding: 50px clamp(30px, 6vw, 78px);
  border-radius: 20px;
  background: #e9eee4;
}
.hero-copy { position: relative; z-index: 1; max-width: 540px; }
.eyebrow { margin: 0 0 12px; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: 1.8px; }
.eyebrow-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--orange); vertical-align: 1px; }
.hero h1, h2, h3 { font-family: Manrope, "Segoe UI", sans-serif; }
.hero h1 { margin: 0; font-size: clamp(35px, 4.2vw, 55px); font-weight: 700; letter-spacing: -2.8px; line-height: 1.12; }
.hero h1 em { color: var(--green); font-style: normal; }
.hero-text { max-width: 420px; margin: 19px 0 24px; color: #66746a; font-size: 15px; line-height: 1.7; }
.hero-art { position: absolute; top: 0; right: 5%; width: 43%; height: 100%; }
.sun { position: absolute; top: 50px; right: 13%; width: 230px; height: 230px; border-radius: 50%; background: #f3d19e; }
.hero-pet { position: absolute; right: 20%; bottom: 5px; font-size: clamp(145px, 20vw, 245px); filter: drop-shadow(0 14px 12px rgb(57 53 39 / 12%)); transform: rotate(-7deg); }
.sparkle { position: absolute; color: var(--orange); }
.sparkle-one { top: 62px; left: 9%; font-size: 34px; }
.sparkle-two { top: 117px; right: 4%; color: var(--green); font-size: 26px; }
.hero-note { position: absolute; right: 0; bottom: 63px; padding: 14px 18px; border: 1px solid #ece7d8; border-radius: 50%; background: var(--white); color: var(--green); font-family: Manrope, sans-serif; font-size: 13px; font-weight: 800; text-align: center; transform: rotate(9deg); }
.hero-caption { position: absolute; bottom: 18px; left: 25px; color: #7c887c; font-size: 11px; }
.hero-caption span { margin-right: 5px; color: var(--orange); }

.panel[hidden] { display: none; }
.panel { animation: appear .24s ease both; }
@keyframes appear { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 0 0 25px; scroll-margin-top: 24px; }
.section-heading .eyebrow { margin-bottom: 7px; }
.section-heading h2 { margin: 0; font-size: clamp(27px, 3vw, 36px); letter-spacing: -1.5px; }
.section-intro { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

.search-bar { display: flex; align-items: end; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); box-shadow: var(--shadow); }
.search-field { display: grid; flex: 1; gap: 7px; }
.field-label, label { color: var(--ink); font-size: 12px; font-weight: 700; }
input, select {
  width: 100%;
  min-height: 43px;
  padding: 0 12px;
  border: 1px solid #dfdfd5;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}
input::placeholder { color: #9aa29b; }
.results-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 35px 0 16px; }
.results-heading h3, .surface h3 { margin: 0; font-size: 19px; letter-spacing: -.4px; }
.results-tools { display: flex; align-items: center; gap: 14px; }
.result-count { color: var(--muted); font-size: 12px; white-space: nowrap; }
.view-switch { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.view-button { display: grid; width: 32px; height: 29px; place-items: center; padding: 5px; border: 0; border-radius: 5px; background: transparent; color: #879187; }
.view-button:hover { background: #f1f3ed; color: var(--ink); }
.view-button.active { background: var(--green-pale); color: var(--green-dark); }
.view-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.pet-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.pet-grid.pet-list { grid-template-columns: 1fr; gap: 9px; }
.pet-card { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--white); box-shadow: 0 7px 24px rgb(44 60 47 / 4%); transition: transform .2s ease, box-shadow .2s ease; }
.pet-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pet-photo { position: relative; display: grid; height: 205px; place-items: center; overflow: hidden; background: #e9eee4; }
.pet-photo img { width: 100%; height: 100%; object-fit: cover; }
.pet-placeholder { font-size: 88px; filter: drop-shadow(0 8px 8px rgb(50 55 48 / 10%)); }
.pet-photo .pet-badge { position: absolute; top: 13px; left: 13px; }
.pet-content { padding: 17px; }
.pet-topline { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.pet-card h3 { overflow: hidden; margin: 0; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
.pet-category { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.pet-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 99px; background: var(--green-pale); color: var(--green-dark); font-size: 10px; font-weight: 700; white-space: nowrap; }
.pet-badge::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.pet-badge.pending { background: #fff1dc; color: #9b682e; }
.pet-badge.sold { background: #f1e9e4; color: #795c50; }
.pet-tags { display: flex; flex-wrap: wrap; gap: 6px; min-height: 23px; margin: 14px 0; }
.pet-tag { padding: 4px 8px; border-radius: 5px; background: #f1f0ea; color: #69746a; font-size: 10px; }
.pet-actions { display: flex; flex-wrap: wrap; gap: 7px; padding-top: 12px; border-top: 1px solid #f0eee8; }
.pet-actions .button { flex: 1; }
.pet-status-control { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.pet-status-control select { min-height: 34px; flex: 1; font-size: 11px; }
.pet-status-control .button { flex: 0 0 auto; }
.pet-list-status { display: none; }
.pet-list-category { display: none; }
.pet-list .pet-list-status { display: grid; gap: 4px; }
.pet-list-header, .pet-list .pet-card { display: grid; grid-template-columns: 58px minmax(100px, 1fr) 104px 95px 240px 166px; align-items: center; gap: 8px; padding: 8px; }
.pet-list .pet-card-category { display: none; }
.pet-list .pet-list-category { display: block; min-width: 0; margin: 0; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.pet-list-header { margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 700; }
.pet-list-header[hidden] { display: none; }
.pet-list .pet-card { border-radius: 10px; box-shadow: 0 3px 12px rgb(44 60 47 / 3%); transition: none; }
.pet-list .pet-card:hover { transform: none; border-color: #bdcdbf; box-shadow: 0 3px 12px rgb(44 60 47 / 3%); }
.pet-list .pet-photo { width: 58px; height: 58px; border-radius: 7px; }
.pet-list .pet-photo .pet-badge { display: none; }
.pet-list .pet-photo .pet-badge::before { width: 5px; height: 5px; }
.pet-list .pet-placeholder { font-size: 35px; }
.pet-list .pet-content { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 4px; padding: 0; }
.pet-list .pet-topline { min-width: 0; }
.pet-list .pet-topline > div { min-width: 0; }
.pet-list .pet-card h3 { font-size: 14px; }
.pet-list .pet-category { overflow: hidden; margin-top: 2px; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.pet-list .pet-tags { min-height: 0; max-height: 24px; overflow: hidden; margin: 0; }
.pet-list .pet-tag { padding: 3px 6px; font-size: 9px; }
.pet-list .pet-actions { grid-column: 5; grid-row: 1; flex-wrap: nowrap; gap: 5px; padding-top: 0; border-top: 0; }
.pet-list .pet-actions .button { min-height: 29px; flex: 0 0 auto; padding: 0 9px; font-size: 10px; }
.pet-list .pet-status-control { grid-column: 6; grid-row: 1; justify-content: end; margin: 0; }
.pet-list .pet-status-control select { width: 118px; min-height: 31px; flex: 0 1 118px; padding: 0 7px; font-size: 10px; }
.pet-list .pet-status-control .button { min-height: 31px; padding: 0 9px; font-size: 10px; }
.pet-list .empty-state, .pet-list .loading-state { grid-column: 1 / -1; }
.empty-state { grid-column: 1 / -1; padding: 50px 20px; border: 1px dashed #d6d9cd; border-radius: 12px; color: var(--muted); text-align: center; }
.empty-state span { display: block; margin-bottom: 9px; font-size: 33px; }
.empty-state strong { display: block; margin-bottom: 5px; color: var(--ink); font-family: Manrope, sans-serif; font-size: 17px; }
.loading-state { grid-column: 1 / -1; padding: 35px; color: var(--muted); text-align: center; }

.notice { max-width: 1110px; margin: 14px auto 0; padding: 12px 16px; border: 1px solid #cbd9cb; border-radius: 8px; background: #eff5ec; color: var(--green-dark); font-size: 13px; }
.notice.error { border-color: #efd2c8; background: #fff1ec; color: #914a3e; }
.notice[hidden] { display: none; }

.content-columns { display: grid; grid-template-columns: .9fr 1.1fr; gap: 20px; margin-top: 25px; }
.surface { padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); box-shadow: 0 6px 20px rgb(44 60 47 / 3%); }
.surface > p:not(.eyebrow) { margin: 9px 0 18px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.surface .eyebrow { margin-bottom: 8px; }
.form-stack { display: grid; gap: 15px; margin-top: 20px; }
.form-stack label { display: grid; gap: 7px; }
.form-stack .button { justify-self: start; }
.form-pair, .button-row { display: flex; gap: 12px; }
.form-pair > label { flex: 1; }
.button-row { flex-wrap: wrap; }
.muted { color: var(--muted); font-size: 13px; }
.inventory-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.inventory-strip > p { grid-column: 1 / -1; margin: 0; }
.inventory-item { padding: 17px 19px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.inventory-number { display: block; margin-bottom: 5px; font-family: Manrope, sans-serif; font-size: 26px; font-weight: 800; }
.inventory-label { color: var(--muted); font-size: 12px; }
.order-list { display: grid; gap: 10px; }
.order-card { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.order-card h4 { margin: 0 0 5px; font-family: Manrope, sans-serif; font-size: 14px; }
.order-card p { margin: 0; color: var(--muted); font-size: 11px; }
.order-status { display: inline-block; margin-top: 6px; color: var(--green); font-size: 10px; font-weight: 700; }
.order-buttons { display: flex; gap: 6px; }
.account-columns { grid-template-columns: 1fr 1fr; }
.demo-note { margin: 0 0 20px; padding: 13px 15px; border: 1px solid #f0dec3; border-radius: 8px; background: #fff8eb; color: #806746; font-size: 12px; line-height: 1.55; }
.demo-note span { margin-right: 5px; color: #d28a39; }
.profile-surface { display: grid; grid-template-columns: 1fr 1.2fr; align-items: center; gap: 15px 25px; margin-top: 20px; }
.profile-surface h3 { margin: 0; }
.inline-form { display: flex; gap: 9px; }
.profile-result { grid-column: 1 / -1; }
.profile-details { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; padding-top: 14px; border-top: 1px solid var(--line); }
.profile-details dt { color: var(--muted); font-size: 10px; }
.profile-details dd { margin: 4px 0 0; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }

.pet-dialog { width: min(480px, calc(100vw - 30px)); max-height: calc(100vh - 30px); overflow: auto; padding: 25px; border: 1px solid var(--line); border-radius: 15px; background: var(--white); color: var(--ink); box-shadow: 0 25px 80px rgb(25 42 31 / 23%); }
.pet-dialog::backdrop { background: rgb(24 37 29 / 45%); backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 15px; }
.dialog-heading h2 { margin: 0; font-size: 25px; letter-spacing: -.9px; }
.pet-dialog .form-stack { margin-top: 22px; }
.icon-button { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: white; color: var(--muted); font-size: 22px; line-height: 1; }
.form-hint { margin: -8px 0 0; color: var(--muted); font-size: 11px; }
.details-dialog #pet-details { display: grid; gap: 15px; margin-top: 20px; }
.details-photo { width: 100%; max-height: 240px; border-radius: 10px; background: #e9eee4; object-fit: cover; }
.details-description { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

.site-footer { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 26px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.footer-paw { font-size: 18px; }

@media (max-width: 850px) {
  .pet-list-header, .pet-list .pet-card { grid-template-columns: 58px minmax(100px, 1fr) 104px 95px; }
  .pet-list-header span:nth-child(n + 5) { display: none; }
  .pet-list .pet-actions { grid-column: 1 / 4; grid-row: 2; }
  .pet-list .pet-status-control { grid-column: 4; grid-row: 2; }
  .site-header { padding-inline: 22px; }
  main { padding-inline: 24px; }
  .hero { min-height: 355px; margin-bottom: 65px; padding-inline: 38px; }
  .hero-art { right: 0; width: 42%; }
  .sun { right: 7%; width: 180px; height: 180px; }
  .hero-pet { right: 12%; font-size: 170px; }
  .hero-note { right: -8px; }
  .pet-grid:not(.pet-list) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-columns { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .pet-list-header { grid-template-columns: 40px minmax(0, 1fr) 82px 64px; }
  .pet-list-header span:nth-child(n + 5) { display: none; }
  .site-header { min-height: 70px; flex-wrap: wrap; gap: 0; padding: 10px 17px 0; }
  .brand { flex: 1; font-size: 17px; }
  .header-cta { display: none; }
  .main-nav { order: 3; width: 100%; height: 43px; justify-content: space-around; gap: 12px; }
  .tab { font-size: 12px; }
  main { padding: 0 16px 55px; }
  .hero { min-height: 400px; align-items: start; margin: 17px 0 54px; padding: 32px 22px 172px; border-radius: 14px; }
  .hero h1 { font-size: 37px; letter-spacing: -1.8px; }
  .hero-text { max-width: 340px; font-size: 13px; }
  .hero-art { top: auto; right: 2%; bottom: 0; width: 70%; height: 200px; }
  .sun { top: 6px; right: 21%; width: 145px; height: 145px; }
  .hero-pet { right: 27%; bottom: -3px; font-size: 155px; }
  .hero-note { right: 0; bottom: 28px; padding: 11px 13px; font-size: 11px; }
  .sparkle-one { top: 0; left: 4%; }
  .sparkle-two { top: 32px; right: 6%; }
  .hero-caption { bottom: 11px; left: 17px; }
  .section-heading { align-items: center; margin-bottom: 19px; }
  .section-heading h2 { font-size: 26px; }
  .section-intro { max-width: 260px; font-size: 12px; line-height: 1.5; }
  #open-add-pet { display: none; }
  #open-add-pet-mobile { display: inline-flex; min-height: 38px; padding-inline: 10px; font-size: 11px; }
  .search-bar { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 14px; }
  .search-bar .button { width: 100%; }
  .pet-grid:not(.pet-list) { grid-template-columns: 1fr; gap: 13px; }
  .pet-grid:not(.pet-list) .pet-photo { height: 200px; }
  .results-heading { align-items: center; margin-top: 28px; }
  .results-heading h3 { font-size: 17px; }
  .results-tools { gap: 7px; }
  .result-count { font-size: 10px; }
  .view-button { width: 29px; }
  .pet-list { gap: 8px; }
  .pet-list .pet-card { grid-template-columns: 40px minmax(0, 1fr) 82px 64px; gap: 8px; padding: 8px; }
  .pet-list .pet-photo { width: 40px; height: 40px; }
  .pet-list .pet-list-category { grid-column: 4; grid-row: 1; font-size: 10px; }
  .pet-list .pet-photo .pet-badge { top: 3px; left: 3px; max-width: calc(100% - 6px); overflow: hidden; font-size: 7px; text-overflow: ellipsis; }
  .pet-list .pet-list-status .pet-badge { padding: 4px 6px; font-size: 9px; }
  .pet-list .pet-content { grid-column: 2; grid-row: 1; grid-template-columns: minmax(0, 1fr); gap: 5px 8px; }
  .pet-list .pet-card h3 { font-size: 13px; }
  .pet-list .pet-category { font-size: 10px; }
  .pet-list .pet-tags { display: none; }
  .pet-list .pet-actions { grid-column: 1 / -1; grid-row: auto; flex-wrap: nowrap; gap: 4px; }
  .pet-list .pet-actions .button { min-height: 29px; flex: 1 1 0; padding: 0 5px; font-size: 9px; }
  .pet-list .pet-status-control { grid-column: 1 / -1; grid-row: auto; justify-content: stretch; margin-top: 0; padding-top: 6px; border-top: 1px solid #f0eee8; }
  .pet-list .pet-status-control select { width: auto; flex: 1; }
  .content-columns, .account-columns { grid-template-columns: 1fr; gap: 13px; }
  .surface { padding: 19px; }
  .inventory-strip { gap: 7px; }
  .inventory-item { padding: 13px 10px; }
  .inventory-number { font-size: 21px; }
  .inventory-label { font-size: 10px; }
  .profile-surface { grid-template-columns: 1fr; gap: 16px; }
  .profile-result { grid-column: auto; }
  .inline-form { align-items: stretch; }
  .inline-form .button { padding-inline: 12px; }
  .order-card { align-items: start; }
  .order-buttons { flex-direction: column; }
}

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