/* FORMA Pets — a calm, legible home for every pet. */

:root {
  color-scheme: light;
  --canvas: #f6f7f4;
  --surface: #ffffff;
  --ink: #152d29;
  --muted: #5e706b;
  --subtle: #6f7d77;
  --primary: #166354;
  --primary-hover: #104f43;
  --pale-green: #e9f2e9;
  --lime: #d8edb0;
  --line: #e3e8e1;
  --danger: #ad4031;
  --danger-bg: #fff0e9;
  --amber: #845b16;
  --amber-bg: #fff6dd;
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --shadow: 0 5px 28px rgb(21 45 41 / 4%);
  --shadow-lg: 0 18px 60px rgb(21 45 41 / 13%);
  --font: "Heebo", "Arial", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button,
summary,
select {
  cursor: pointer;
}
button {
  color: inherit;
}
img {
  display: block;
  max-width: 100%;
}
svg {
  flex-shrink: 0;
}
a {
  color: var(--primary);
  text-underline-offset: 4px;
}
a:hover {
  text-decoration-thickness: 2px;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.3;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(27px, 2.6vw, 38px);
  font-weight: 800;
}
h2 {
  font-size: 23px;
  font-weight: 800;
}
h3 {
  font-size: 18px;
  font-weight: 700;
}
p + p {
  margin-top: 12px;
}
small {
  font-size: 13px;
}
strong {
  font-weight: 700;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 3px solid #3e8370;
  outline-offset: 4px;
}
:target {
  scroll-margin-top: 110px;
}
.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  inset-block-start: 12px;
  inset-inline-start: 16px;
  z-index: 100;
  padding: 12px 20px;
  border-radius: 10px;
  background: var(--primary);
  color: white;
  transform: translateY(-170%);
}
.skip-link:focus {
  transform: translateY(0);
}
.muted {
  color: var(--muted);
}
.subtle {
  color: var(--subtle);
  font-size: 13px;
}

.table-wrap td > .subtle {
  display: block;
  margin-top: 3px;
}
.eyebrow {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.07em;
  margin-block-end: 8px;
}
.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin-block: 22px;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.row.between {
  justify-content: space-between;
}
.row.wrap {
  flex-wrap: wrap;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.grid {
  display: grid;
  gap: 24px;
  min-width: 0;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.text-center {
  text-align: center;
}
.ltr {
  direction: ltr;
  unicode-bidi: isolate;
}

/* Shared chrome */
.app-header {
  height: 88px;
  padding-inline: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  inset-block-start: 0;
  z-index: 20;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}
.brand-mark {
  display: grid;
  place-items: center;
  background: var(--primary);
  color: var(--lime);
  width: 46px;
  height: 46px;
  border-radius: 15px 15px 15px 5px;
}
.brand-mark .icon {
  width: 27px;
  height: 27px;
  stroke-width: 1.8;
}
.brand-name {
  display: block;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.05;
  direction: ltr;
}
.brand-name span {
  font-weight: 500;
  color: var(--primary);
}
.brand-caption {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 0.01em;
}
.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}
.header-separator {
  height: 26px;
  width: 1px;
  background: var(--line);
  margin-inline: 5px;
}
.account-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--pale-green);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}
.account-name {
  font-size: 14px;
  font-weight: 600;
}
.app-shell {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  min-height: calc(100dvh - 88px);
  max-width: 1800px;
  margin-inline: auto;
}
.sidebar {
  padding: 30px 20px;
  background: var(--surface);
  border-inline-end: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  top: 88px;
  height: calc(100dvh - 88px);
  min-height: 400px;
}
.nav-group-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 8px 16px 12px;
}
.nav-item {
  min-height: 48px;
  padding: 12px 16px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  text-decoration: none;
  text-align: start;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  width: 100%;
  transition:
    color 0.18s,
    background 0.18s;
}
.nav-item .icon {
  width: 19px;
  height: 19px;
}
.nav-item:hover {
  background: #f3f6f1;
  color: var(--primary);
}
.nav-item.active {
  background: var(--pale-green);
  color: var(--primary);
}
.nav-item .count {
  margin-inline-start: auto;
  min-width: 22px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 11px;
  background: white;
}
.sidebar-footer {
  margin-block-start: auto;
  padding: 24px 14px 0;
  color: var(--muted);
  font-size: 12px;
}
.sidebar-note {
  background: #f6f8f2;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 24px;
}
.sidebar-note .icon {
  margin-bottom: 10px;
  color: var(--primary);
}
.sidebar-note p {
  font-size: 12px;
  line-height: 1.75;
}
.sidebar-note strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  margin-bottom: 4px;
}
.workspace {
  padding: 36px 40px 64px;
  min-width: 0;
  width: 100%;
  max-width: 1260px;
  margin-inline: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 28px;
}
.page-heading p {
  margin-top: 7px;
  font-size: 14px;
  color: var(--muted);
}
.page-heading .eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  color: var(--primary);
}
.page-heading h1 {
  font-size: clamp(26px, 2.3vw, 34px);
}
.mobile-nav {
  display: none;
}
.finder-sticky {
  display: none;
}
.demo-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  min-height: 38px;
  background: #e9efd6;
  color: #43533a;
  font-size: 12px;
  text-align: center;
  border-bottom: 1px solid #dce6c6;
}
.demo-banner .icon {
  width: 15px;
  height: 15px;
}
.demo-banner a {
  color: inherit;
  font-weight: 700;
}

/* Buttons and small indicators */
.btn {
  min-height: 44px;
  min-width: 44px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 17px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  transition:
    background 0.18s,
    border-color 0.18s,
    box-shadow 0.18s,
    color 0.18s;
  cursor: pointer;
}
.btn:hover {
  background: #f0f4ed;
  border-color: #cad6c7;
}
.btn:active {
  box-shadow: inset 0 2px 5px rgb(21 45 41 / 9%);
}
.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}
.btn.primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}
.btn.secondary {
  background: var(--pale-green);
  color: var(--primary);
  border-color: transparent;
}
.btn.secondary:hover {
  background: #dceada;
  border-color: #c5dbc6;
}
.btn.danger {
  color: var(--danger);
  background: var(--danger-bg);
  border-color: #f4cbbb;
}
.btn.danger:hover {
  background: #ffe2d6;
  border-color: #e6ac97;
}
.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.btn.ghost:hover {
  color: var(--primary);
  background: #edf2e9;
}
.btn.small {
  font-size: 12px;
  padding: 9px 12px;
}
.btn.small .icon {
  width: 17px;
  height: 17px;
}
.btn.wide {
  width: 100%;
}
.btn.icon-button,
.icon-button {
  padding: 10px;
  width: 44px;
  min-height: 44px;
  border-radius: 11px;
  display: inline-grid;
  place-items: center;
}
.btn.light {
  color: var(--ink);
  background: var(--lime);
  border-color: var(--lime);
}
.btn.light:hover {
  background: #c5e395;
  border-color: #c5e395;
}
.btn[disabled],
button[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
  background: #edf0e9;
  color: var(--muted);
  white-space: nowrap;
}
.badge .icon {
  width: 13px;
  height: 13px;
}
.badge.green {
  color: #256047;
  background: #eaf4df;
}
.badge.red {
  color: var(--danger);
  background: #ffebe4;
}
.badge.amber {
  color: var(--amber);
  background: var(--amber-bg);
}
.badge.muted {
  color: #5c6b61;
  background: #eef1eb;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  background: currentColor;
  border-radius: 50%;
}
.chips {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 9px 14px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.chip.active,
.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}
.chip:hover:not(.active) {
  border-color: var(--primary);
  color: var(--primary);
}

/* Overview */
.welcome-banner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-block-end: 26px;
}
.welcome-banner::after {
  content: "";
  position: absolute;
  width: 245px;
  height: 245px;
  border-radius: 50%;
  border: 40px solid rgb(216 237 176 / 6%);
  inset-inline-end: 14%;
  top: -145px;
  pointer-events: none;
}
.welcome-copy {
  position: relative;
  z-index: 1;
  max-width: 560px;
}
.welcome-copy .eyebrow {
  color: #d8edb0;
  font-size: 11px;
  margin-bottom: 9px;
}
.welcome-copy h2 {
  color: white;
  font-size: clamp(24px, 2.15vw, 32px);
  margin-bottom: 10px;
}
.welcome-copy p {
  color: #e0eae0;
  font-size: 14px;
  line-height: 1.8;
}
.welcome-banner > .actions {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  position: relative;
  align-content: start;
  align-items: start;
  gap: 5px 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 16px;
  padding: 22px 20px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.stat-card > .stat-label,
.stat-card > .stat-value {
  grid-column: 1;
}
.stat-card > .stat-icon {
  grid-column: 2;
  grid-row: 1 / 3;
}
.stat-card > .progress-bar,
.stat-card > .field-help {
  grid-column: 1 / -1;
}
.stat-card > .btn {
  grid-column: 1 / -1;
  justify-self: start;
  margin-inline: -10px;
}
.stats-grid:has(> .stat-card:nth-child(3):last-child) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.stat-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 5px;
}
.stat-value {
  display: block;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.3;
}
.stat-card .subtle {
  display: block;
  font-size: 11px;
  margin-top: 7px;
}
.stat-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #edf3e6;
  color: var(--primary);
  flex-shrink: 0;
}
.stat-icon .icon {
  width: 19px;
  height: 19px;
}
.stat-icon.amber {
  background: var(--amber-bg);
  color: var(--amber);
}
.stat-icon.red {
  color: var(--danger);
  background: var(--danger-bg);
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
  box-shadow: var(--shadow);
  overflow: clip;
}
.panel + .panel {
  margin-top: 24px;
}
.grid > .panel + .panel,
.grid-2 > .panel + .panel {
  margin-top: 0;
}
.panel-head {
  padding: 23px 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 {
  font-size: 18px;
}
.panel-head p {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.panel-body {
  padding: 24px;
}
.panel-body > h3 {
  margin-bottom: 12px;
}
.panel-body > p + .actions {
  margin-top: 20px;
}
.panel-head .badge {
  margin-inline-start: 6px;
}
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
}
.search-field {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  background: #fafbf8;
  border-radius: 10px;
  padding-inline: 13px;
  max-width: 100%;
  flex: 0 1 290px;
}
.search-field .icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
}
.search-field input {
  background: transparent;
  padding: 10px 0;
  height: 44px;
  border: none;
  width: 100%;
  min-width: 0;
  font-size: 13px;
}
.search-field:focus-within {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.search-field input:focus {
  outline: 0;
  box-shadow: none;
}
.table-wrap {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  max-width: 100%;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: start;
  white-space: nowrap;
  font-size: 13px;
}
th {
  background: #fafbf8;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  text-align: start;
}
td {
  padding: 17px 20px;
  border-bottom: 1px solid #edf0e9;
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: none;
}
tbody tr {
  transition: background 0.16s;
}
tbody tr:hover {
  background: #fafcf7;
}
td .actions {
  gap: 2px;
  flex-wrap: nowrap;
}
td .btn.small {
  padding: 8px 10px;
}
td .btn.icon-button {
  padding: 9px;
}
.tag-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tag-cell strong {
  display: block;
  font-size: 14px;
}
.tag-cell .subtle {
  display: block;
  margin-top: 2px;
  font-size: 11px;
}
.pet-thumb {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 13px;
  background: #eef1e9;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--primary);
}
.table-footer {
  padding: 15px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
}
.report-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.report-item:first-child {
  padding-top: 0;
}
.report-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.report-item p {
  font-size: 13px;
}
.report-item .subtle {
  display: block;
  margin-top: 4px;
  font-size: 11px;
}
.report-item > .icon {
  padding: 9px;
  box-sizing: content-box;
  border-radius: 12px;
  background: var(--pale-green);
  color: var(--primary);
}
.empty-state {
  padding: 48px 24px;
  text-align: center;
  display: grid;
  place-items: center;
  gap: 12px;
}
.empty-state > .icon {
  width: 44px;
  height: 44px;
  color: #83977f;
  background: var(--pale-green);
  padding: 10px;
  box-sizing: content-box;
  border-radius: 20px;
  margin-bottom: 8px;
}
.empty-state h2,
.empty-state h3 {
  font-size: 20px;
}
.empty-state p {
  max-width: 430px;
  color: var(--muted);
  font-size: 14px;
}
.empty-state .actions {
  justify-content: center;
  margin-top: 10px;
}
.section-tabs {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-inline: 24px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.section-tabs button,
.section-tabs a {
  min-height: 52px;
  padding: 14px 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: none;
  color: var(--muted);
  border: 0;
  border-bottom: 2px solid transparent;
  font-size: 13px;
  white-space: nowrap;
  text-decoration: none;
}
.section-tabs .active,
.section-tabs [aria-selected="true"] {
  color: var(--primary);
  font-weight: 700;
  border-bottom-color: var(--primary);
}

/* Finder / public pet profile */
.finder-page {
  max-width: 1120px;
  margin-inline: auto;
  padding: 36px 30px 64px;
}
.finder-page .page-heading {
  margin-bottom: 24px;
}
.finder-intro {
  margin-bottom: 24px;
}
.finder-intro h1 {
  font-size: 31px;
}
.finder-intro p {
  color: var(--muted);
  margin-top: 7px;
  font-size: 14px;
}
.profile-layout {
  display: grid;
  grid-template-columns: minmax(270px, 0.9fr) minmax(0, 1.25fr);
  gap: 26px;
  align-items: start;
}
.pet-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
}
.pet-cover {
  height: 285px;
  background: #e8eddf;
  position: relative;
  overflow: hidden;
}
.pet-cover > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
}
.pet-cover > .badge {
  position: absolute;
  inset-block-start: 18px;
  inset-inline-start: 18px;
  background: rgb(255 255 255 / 94%);
  color: var(--primary);
  box-shadow: var(--shadow);
}
.pet-cover .pet-placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  color: #668163;
}
.pet-cover .pet-placeholder .icon {
  width: 96px;
  height: 96px;
  stroke-width: 1;
}
.pet-avatar {
  width: 92px;
  height: 92px;
  border-radius: 26px;
  border: 5px solid white;
  background: var(--pale-green);
  object-fit: cover;
  display: grid;
  place-items: center;
  margin-top: -48px;
  position: relative;
}
.pet-avatar .icon {
  width: 45px;
  height: 45px;
  color: var(--primary);
}
.pet-details {
  padding: 25px 26px 27px;
}
.pet-details h1 {
  font-size: 36px;
  margin-bottom: 4px;
}
.pet-details > p {
  color: var(--muted);
  font-size: 14px;
}
.pet-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
  padding-top: 21px;
  border-top: 1px solid var(--line);
}
.fact {
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fact span,
.fact small {
  font-size: 11px;
  color: var(--muted);
}
.fact strong {
  font-weight: 600;
}
.profile-note {
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 17px;
}
.emergency-banner {
  background: var(--danger-bg);
  border: 1px solid #f4cbbb;
  border-radius: 16px;
  padding: 19px 22px;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  color: #843a2a;
}
.emergency-banner > .icon {
  margin-top: 3px;
  width: 24px;
  height: 24px;
}
.emergency-banner strong {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}
.emergency-banner p {
  color: #854f3f;
  font-size: 13px;
}
.emergency-banner .btn {
  margin-top: 14px;
}
.contact-stack {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 22px;
}
.contact-stack .btn {
  min-height: 52px;
  font-size: 15px;
}
.info-card,
.medical-card,
.calming-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  min-width: 0;
}
.info-card h2,
.medical-card h2,
.calming-card h2 {
  font-size: 18px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.info-card > p,
.medical-card > p,
.calming-card > p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}
.medical-card {
  background: #fff9ed;
  border-color: #f0e7d2;
}
.medical-card h2 {
  color: #78551b;
}
.medical-card .medical-line {
  font-size: 14px;
  padding-block: 9px;
  border-bottom: 1px solid #f0e7d2;
}
.medical-card .medical-line:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.calming-card {
  background: #edf3e9;
  border-color: #dfe9d8;
}
.calming-card h2 {
  color: var(--primary);
}
.tip-list {
  list-style: none;
  padding: 0;
  margin: 15px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13px;
  color: #4c624e;
}
.tip-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.tip-list .icon {
  color: #51724c;
  width: 17px;
  height: 17px;
  margin-top: 2px;
}
.finder-footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding-top: 30px;
}
.finder-footer a {
  font-weight: 600;
}
.owner-summary {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px;
  background: #f5f8f0;
  border: 1px solid var(--line);
  border-radius: 13px;
}
.owner-summary > .icon {
  background: white;
  padding: 9px;
  box-sizing: content-box;
  border-radius: 12px;
  color: var(--primary);
}
.owner-summary strong {
  display: block;
  font-size: 14px;
}
.owner-summary p {
  font-size: 12px;
  color: var(--muted);
}
.owner-summary .badge {
  margin-inline-start: auto;
}
.owner-workspace .pet-cover {
  height: 220px;
}
.owner-workspace .profile-layout {
  grid-template-columns: minmax(250px, 0.75fr) minmax(0, 1.35fr);
}
.progress-bar {
  height: 7px;
  border-radius: 20px;
  background: #e4eadf;
  overflow: hidden;
  margin-block: 11px;
}
.progress-bar > span,
.progress-bar > div {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: inherit;
}
.progress-caption {
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}
.completion-card {
  border: 1px solid #cfdfbc;
  background: #eff5e5;
  padding: 22px 24px;
  border-radius: 16px;
}
.completion-card h3 {
  font-size: 16px;
  margin-bottom: 6px;
}
.completion-card p {
  font-size: 13px;
  color: var(--muted);
}
.qr-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.qr-card > svg,
.qr-card > canvas,
.qr-card > img {
  max-width: 180px;
  height: auto;
  margin: 18px auto;
}
.qr-card h3 {
  font-size: 18px;
}
.qr-card p {
  color: var(--muted);
  font-size: 13px;
}
.qr-card .actions {
  justify-content: center;
  margin-top: 18px;
}
.qr-card code {
  font-size: 11px;
  background: var(--canvas);
  border-radius: 6px;
  padding: 5px 8px;
  overflow-wrap: anywhere;
}

/* Forms, activation and dialogs */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.field {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 7px;
}
.field.full {
  grid-column: 1 / -1;
}
.field > label,
.field > .label,
fieldset legend {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
input,
textarea,
select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cbd5c8;
  border-radius: 10px;
  padding: 11px 13px;
  line-height: 1.5;
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
}
input::placeholder,
textarea::placeholder {
  color: #788479;
  opacity: 1;
  font-size: 13px;
}
input[type="tel"],
input[type="email"],
input[type="url"] {
  direction: ltr;
  text-align: start;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
textarea {
  resize: vertical;
  min-height: 108px;
}
input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  min-height: 18px;
  height: 18px;
  accent-color: var(--primary);
  padding: 0;
  flex-shrink: 0;
  cursor: pointer;
}
input[type="file"] {
  font-size: 12px;
  padding: 8px;
}
input[type="file"]::file-selector-button {
  min-height: 34px;
  border: none;
  border-radius: 6px;
  background: var(--pale-green);
  color: var(--primary);
  font-family: var(--font);
  font-weight: 500;
  padding: 5px 12px;
  margin-inline-end: 12px;
  cursor: pointer;
}
input[readonly] {
  background: #f4f6f0;
  color: var(--muted);
}
input[aria-invalid="true"],
textarea[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: var(--danger);
  background: #fffaf7;
}
.field-error {
  color: var(--danger);
  font-size: 12px;
}
.field-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.field .row label {
  font-weight: 400;
  font-size: 13px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
fieldset {
  min-width: 0;
  padding: 0;
  border: 0;
  margin: 0;
}
fieldset legend {
  margin-bottom: 14px;
  font-size: 16px;
}
.steps {
  display: flex;
  align-items: center;
  margin: 0 0 30px;
  padding: 0;
  list-style: none;
  counter-reset: step;
  gap: 10px;
}
.step {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  flex: 1;
  color: var(--muted);
  font-size: 12px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #eef1e9;
  color: var(--muted);
  flex-shrink: 0;
  font-weight: 600;
}
.step::after {
  content: "";
  background: var(--line);
  height: 1px;
  flex: 1;
  margin-inline-start: 4px;
}
.step:last-child::after {
  display: none;
}
.step.active {
  color: var(--primary);
  font-weight: 700;
}
.step.active::before {
  background: var(--primary);
  color: white;
}
.step.done::before {
  content: "✓";
  color: var(--primary);
  background: var(--lime);
}
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-block: 17px;
  border-bottom: 1px solid var(--line);
}
.toggle-row:first-child {
  padding-top: 0;
}
.toggle-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.toggle-row strong {
  font-size: 14px;
  font-weight: 600;
  display: block;
}
.toggle-row p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.switch {
  width: 46px;
  min-height: 44px;
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  cursor: pointer;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 46px;
  height: 44px;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}
.switch span {
  width: 46px;
  height: 26px;
  display: block;
  position: relative;
  border-radius: 20px;
  background: #a1afa0;
  transition: background 0.2s;
}
.switch span::after {
  content: "";
  position: absolute;
  inset-block-start: 3px;
  inset-inline-start: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgb(21 45 41 / 15%);
  transition: inset-inline-start 0.2s;
}
.switch input:checked + span {
  background: var(--primary);
}
.switch input:checked + span::after {
  inset-inline-start: 23px;
}
.switch input:focus-visible + span {
  outline: 3px solid #3e8370;
  outline-offset: 4px;
}
.switch input:disabled + span {
  opacity: 0.4;
}
details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  padding: 0 18px;
}
details + details {
  margin-top: 10px;
}
summary {
  padding: 15px 0;
  min-height: 50px;
  font-size: 14px;
  font-weight: 600;
}
details > p,
details > div {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}
summary::marker {
  color: var(--primary);
}
.modal {
  padding: 0;
  max-width: 540px;
  width: calc(100% - 32px);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  color: var(--ink);
  background: white;
  box-shadow: var(--shadow-lg);
}
.modal.large {
  max-width: 760px;
}
.modal::backdrop {
  background: rgb(14 35 30 / 43%);
  backdrop-filter: blur(3px);
}
.modal-header {
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.modal-header h2 {
  font-size: 23px;
}
.modal-header p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 5px;
}
.close-dialog {
  min-height: 44px;
  width: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 0;
  background: #f3f6ee;
  color: var(--muted);
  font-size: 24px;
}
.close-dialog:hover {
  background: #e7eddf;
  color: var(--primary);
}
.modal-body {
  padding: 26px 28px;
}
.modal-footer {
  padding: 20px 28px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}
.modal-footer .muted {
  margin-inline-end: auto;
  font-size: 12px;
}
.error-card {
  padding: 17px 20px;
  border: 1px solid #edb9a7;
  background: #fff1eb;
  border-radius: 13px;
  color: #8c3f2e;
  margin-block-end: 22px;
  font-size: 13px;
}
.error-card strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}
.error-card ul {
  margin: 10px 0 0;
  padding-inline-start: 20px;
}
.error-card a {
  color: inherit;
}
.toast {
  position: fixed;
  inset-inline-start: 50%;
  inset-block-end: 26px;
  transform: translateX(50%);
  z-index: 90;
  max-width: calc(100vw - 32px);
  width: max-content;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 23px;
  color: white;
  background: var(--ink);
  border-radius: 13px;
  box-shadow: var(--shadow-lg);
  font-size: 14px;
}
html[dir="ltr"] .toast {
  transform: translateX(-50%);
}
.toast .icon {
  color: var(--lime);
}
.toast.error {
  background: #883e2e;
}
.toast.error .icon {
  color: #ffded0;
}
.skeleton {
  background: #e7ece2;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  min-height: 20px;
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgb(255 255 255 / 60%),
    transparent
  );
  transform: translateX(-100%);
  animation: shimmer 1.3s ease-in-out infinite;
}
@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}
.print-only {
  display: none;
}
.print-sheet {
  padding: 35px;
  margin-inline: auto;
  text-align: center;
  max-width: 550px;
  background: white;
}
.print-sheet svg,
.print-sheet img {
  width: 220px;
  max-width: 100%;
  height: auto;
  margin: 25px auto;
}
.print-sheet h1 {
  margin-bottom: 10px;
}
.print-sheet p {
  margin-top: 15px;
}
.print-sheet code {
  font-size: 13px;
  overflow-wrap: anywhere;
}

/* Compact profile-card presentation and flat dashboard content. */
.pet-card > .pet-cover {
  height: 154px;
  background: #dfe9d2;
}
.pet-cover-mark {
  position: absolute;
  inset-inline-end: 24px;
  inset-block-end: -28px;
  color: #ceddbb;
  transform: rotate(-15deg);
}
.pet-cover-mark .icon {
  width: 158px;
  height: 158px;
  stroke-width: 1;
}
.pet-card > .pet-avatar {
  width: 140px;
  height: 140px;
  border-radius: 34px;
  margin: -75px 26px 0;
  overflow: hidden;
}
.pet-avatar img,
.pet-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pet-card .pet-details h2 {
  font-size: 36px;
  margin-bottom: 6px;
}
.pet-card > .pet-details {
  padding-top: 17px;
}
.pet-card > .panel-body {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.pet-card > .panel-body > .field-help {
  margin-top: 15px;
  font-size: 11px;
}
.welcome-banner > .pet-avatar {
  width: 138px;
  height: 138px;
  border-radius: 35px;
  margin: 0;
  border-color: rgb(255 255 255 / 18%);
  flex-shrink: 0;
  overflow: hidden;
  transform: rotate(-5deg);
}
.welcome-copy > .badge {
  margin-bottom: 14px;
}
.welcome-copy > .actions {
  margin-top: 20px;
}
.welcome-copy .btn.primary {
  border-color: #b8d68c;
  background: var(--lime);
  color: var(--ink);
}
.welcome-copy .btn.primary:hover {
  background: #c7e595;
}
.medical-card:has(> div),
.calming-card:has(> div) {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.medical-card:has(> div) > .icon,
.calming-card:has(> div) > .icon {
  width: 23px;
  height: 23px;
  margin-top: 1px;
}
.medical-card:has(> div) h3,
.calming-card:has(> div) h3 {
  margin-bottom: 5px;
  font-size: 16px;
}
.medical-card:has(> div) p,
.calming-card:has(> div) p {
  font-size: 13px;
}
.sidebar-footer > .info-card {
  padding: 16px;
  border-radius: 14px;
  background: #f7f9f2;
  margin-bottom: 22px;
}
.sidebar-footer > .info-card > .icon {
  display: block;
  color: var(--primary);
  margin-bottom: 13px;
}
.sidebar-footer > .info-card strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  margin-bottom: 6px;
}
.sidebar-footer > .info-card p {
  font-size: 11px;
  line-height: 1.8;
}
.sidebar-footer > a {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 11px;
  text-decoration: none;
}
.sidebar-footer > a .icon {
  width: 13px;
  height: 13px;
}
.qr-render {
  width: min(100%, 220px);
  margin: 0 auto 24px;
  background: white;
}
.qr-render > canvas,
.qr-render > img,
.qr-render > svg {
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}
.report-item:has(> p) {
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}
.emergency-banner:has(> .btn) {
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.emergency-banner > div {
  flex: 1;
  min-width: 200px;
}
.emergency-banner > div > .icon {
  float: inline-start;
  margin-inline-end: 12px;
  margin-top: 3px;
}
.emergency-banner > .btn {
  margin-top: 0;
}
.finder-page footer.page-heading {
  padding-top: 23px;
  border-top: 1px solid var(--line);
  align-items: center;
}
.finder-page footer.page-heading strong {
  font-size: 15px;
}

@media (min-width: 1440px) {
  .workspace {
    padding-top: 42px;
    padding-inline: 52px;
  }
  .welcome-banner {
    padding: 34px 36px;
  }
  .app-header {
    padding-inline: 38px;
  }
}
@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .sidebar {
    padding-inline: 13px;
  }
  .workspace {
    padding: 28px 26px 48px;
  }
  .stats-grid {
    gap: 12px;
  }
  .stat-card {
    padding: 18px 16px;
    gap: 8px;
  }
  .stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }
  .stat-value {
    font-size: 29px;
  }
  .welcome-banner {
    padding: 26px;
  }
  .welcome-banner > .actions {
    max-width: 160px;
  }
  .grid-3 {
    gap: 16px;
  }
}
@media (max-width: 1023px) {
  .app-header {
    padding-inline: 24px;
    height: 78px;
  }
  .app-shell {
    grid-template-columns: 184px minmax(0, 1fr);
    min-height: calc(100dvh - 78px);
  }
  .sidebar {
    padding: 24px 10px;
    top: 78px;
    height: calc(100dvh - 78px);
  }
  .nav-item {
    padding: 12px;
    gap: 9px;
    font-size: 13px;
  }
  .sidebar-footer {
    padding-inline: 7px;
  }
  .sidebar-note {
    padding: 13px;
  }
  .workspace {
    padding: 26px 22px 48px;
  }
  .page-heading {
    align-items: flex-start;
    margin-bottom: 24px;
  }
  .page-heading .actions {
    justify-content: flex-end;
  }
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .stats-grid:has(> .stat-card:nth-child(3):last-child) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .stat-card {
    padding: 19px 20px;
  }
  .stat-value {
    font-size: 31px;
  }
  .welcome-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }
  .welcome-banner > .actions {
    max-width: none;
  }
  .welcome-banner > .pet-avatar {
    display: none;
  }
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-2 {
    gap: 18px;
  }
  .profile-layout,
  .owner-workspace .profile-layout {
    grid-template-columns: 1fr;
  }
  .profile-layout .pet-cover {
    height: 300px;
  }
  .pet-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .finder-page .profile-layout {
    grid-template-columns: minmax(255px, 0.85fr) minmax(0, 1fr);
    gap: 20px;
  }
  .finder-page .pet-cover {
    height: 290px;
  }
  .finder-page .pet-card > .pet-cover {
    height: 154px;
  }
  .finder-page .info-card,
  .finder-page .calming-card,
  .finder-page .medical-card {
    padding: 20px;
  }
  .panel-head,
  .panel-body {
    padding: 20px;
  }
  .filter-bar {
    padding: 14px 20px;
  }
}
@media (max-width: 767px) {
  html {
    scroll-padding-top: 80px;
  }
  body {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }
  .app-header {
    height: 74px;
    padding-inline: 20px;
    gap: 10px;
  }
  .brand {
    gap: 9px;
  }
  .brand-mark {
    width: 39px;
    height: 39px;
    border-radius: 12px 12px 12px 4px;
  }
  .brand-mark .icon {
    width: 23px;
    height: 23px;
  }
  .brand-name {
    font-size: 21px;
  }
  .brand-caption {
    font-size: 10px;
  }
  .header-actions {
    gap: 7px;
  }
  .header-actions .btn {
    font-size: 12px;
    padding-inline: 11px;
  }
  .header-actions .account-name,
  .header-separator,
  .header-actions > .subtle {
    display: none;
  }
  .app-shell {
    display: block;
    min-height: calc(100dvh - 74px);
  }
  .sidebar {
    display: none;
  }
  .workspace {
    padding: 25px 20px 36px;
  }
  .page-heading {
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 22px;
  }
  .page-heading h1 {
    font-size: 28px;
  }
  .page-heading p {
    font-size: 13px;
  }
  .page-heading .actions {
    justify-content: flex-start;
  }
  .page-heading > .actions .btn {
    font-size: 12px;
  }
  .welcome-banner {
    border-radius: 19px;
    padding: 25px 23px;
    margin-bottom: 20px;
    gap: 19px;
  }
  .welcome-copy h2 {
    font-size: 27px;
    max-width: 330px;
  }
  .welcome-copy p {
    font-size: 13px;
  }
  .welcome-banner .btn {
    font-size: 13px;
  }
  .welcome-banner::after {
    inset-inline-end: -65px;
    top: -120px;
  }
  .stats-grid {
    margin-bottom: 22px;
    gap: 11px;
  }
  .stat-card {
    padding: 17px 16px;
    border-radius: 14px;
    gap: 7px;
  }
  .stat-label {
    font-size: 11px;
    margin-bottom: 6px;
  }
  .stat-value {
    font-size: 29px;
  }
  .stat-card .subtle {
    font-size: 10px;
    margin-top: 5px;
  }
  .stat-icon {
    height: 31px;
    width: 31px;
  }
  .stat-icon .icon {
    width: 17px;
    height: 17px;
  }
  .grid,
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .panel {
    border-radius: 17px;
  }
  .panel-head {
    padding: 19px 18px;
  }
  .panel-head h2 {
    font-size: 17px;
  }
  .panel-head p {
    font-size: 11px;
  }
  .panel-head .btn {
    font-size: 11px;
    padding-inline: 10px;
  }
  .panel-body {
    padding: 20px 18px;
  }
  .filter-bar {
    padding: 14px 18px;
    gap: 12px;
  }
  .search-field {
    flex-basis: 100%;
  }
  .chips {
    gap: 6px;
  }
  .chip {
    font-size: 12px;
    padding-inline: 12px;
  }
  th {
    padding-inline: 16px;
  }
  td {
    padding: 15px 16px;
  }
  .table-footer {
    padding-inline: 18px;
    font-size: 11px;
  }
  .section-tabs {
    padding-inline: 18px;
    gap: 18px;
  }
  .mobile-nav {
    display: flex;
    position: fixed;
    inset-block-end: 0;
    inset-inline: 0;
    align-items: stretch;
    justify-content: space-around;
    z-index: 30;
    min-height: 72px;
    padding: 7px 8px calc(6px + env(safe-area-inset-bottom));
    background: rgb(255 255 255 / 97%);
    border-top: 1px solid var(--line);
    box-shadow: 0 -3px 20px rgb(21 45 41 / 4%);
  }
  .mobile-nav .nav-item {
    width: auto;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    margin-inline: 2px;
    font-size: 10px;
    border-radius: 10px;
  }
  .mobile-nav .nav-item .icon {
    width: 21px;
    height: 21px;
  }
  .mobile-nav .nav-item.active {
    color: var(--primary);
    background: #eff4e9;
  }
  .mobile-nav > button {
    border: 0;
    background: transparent;
    color: var(--muted);
    width: auto;
    flex: 1;
    min-width: 0;
    min-height: 58px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    margin-inline: 2px;
    font-size: 10px;
    border-radius: 10px;
  }
  .mobile-nav > button .icon {
    width: 21px;
    height: 21px;
  }
  .mobile-nav > button.active {
    color: var(--primary);
    background: #eff4e9;
  }
  .stats-grid:has(> .stat-card:nth-child(3):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats-grid:has(> .stat-card:nth-child(3):last-child)
    > .stat-card:last-child {
    grid-column: 1 / -1;
  }
  .finder-page {
    padding: 25px 20px 110px;
  }
  body:has(.finder-page) {
    padding-bottom: 0;
  }
  .finder-page .profile-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .finder-intro h1 {
    font-size: 28px;
  }
  .finder-page .pet-cover {
    height: 310px;
  }
  .finder-page .pet-card > .pet-cover {
    height: 100px;
  }
  .finder-page .pet-card > .pet-avatar {
    width: 96px;
    height: 96px;
    border-radius: 25px;
    margin: -48px 20px 0;
    border-width: 4px;
  }
  .finder-page .pet-card > .pet-details {
    padding: 10px 20px 17px;
  }
  .finder-page .pet-card .pet-details h2 {
    font-size: 30px;
    margin-bottom: 3px;
  }
  .finder-page .pet-card .pet-details > p {
    font-size: 12px;
  }
  .finder-page .pet-card .pet-facts {
    margin-top: 13px;
    padding-top: 12px;
    gap: 8px;
  }
  .finder-page .pet-card .fact {
    gap: 2px;
    font-size: 12px;
  }
  .finder-page .pet-card > .panel-body {
    padding: 13px 20px;
  }
  .finder-page .pet-card > .panel-body > .eyebrow {
    margin-bottom: 5px;
    font-size: 10px;
  }
  .finder-page .pet-card > .panel-body > .row {
    font-size: 12px;
    gap: 8px;
  }
  .finder-page .pet-card > .panel-body > .field-help {
    display: none;
  }
  .finder-page .pet-cover-mark {
    inset-inline-end: 18px;
    inset-block-end: -26px;
  }
  .finder-page .pet-cover-mark .icon {
    width: 116px;
    height: 116px;
  }
  .finder-sticky {
    position: fixed;
    inset-inline: 0;
    inset-block-end: 0;
    display: flex;
    gap: 10px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgb(255 255 255 / 98%);
    border-top: 1px solid var(--line);
    box-shadow: 0 -5px 25px rgb(21 45 41 / 7%);
    z-index: 35;
  }
  .finder-sticky .btn {
    flex: 1;
    min-height: 48px;
    font-size: 13px;
  }
  body:has(.mobile-nav) .finder-sticky {
    display: none;
  }
  .pet-card {
    border-radius: 23px;
  }
  .pet-details {
    padding: 23px;
  }
  .pet-details h1 {
    font-size: 35px;
  }
  .info-card,
  .medical-card,
  .calming-card {
    border-radius: 17px;
    padding: 21px;
  }
  .emergency-banner {
    padding: 18px 19px;
  }
  .emergency-banner p {
    font-size: 12px;
  }
  .form-grid {
    gap: 18px;
  }
  .modal-header {
    padding: 21px;
  }
  .modal-body {
    padding: 23px 21px;
  }
  .modal-footer {
    padding: 18px 21px;
    flex-wrap: wrap;
  }
  .modal-footer .muted {
    width: 100%;
    margin-bottom: 3px;
  }
  .modal {
    max-height: calc(100dvh - 30px);
    border-radius: 19px;
  }
  .toast {
    inset-block-end: calc(90px + env(safe-area-inset-bottom));
    font-size: 13px;
    padding: 14px 18px;
  }
  body:has(.finder-page) .toast {
    inset-block-end: calc(88px + env(safe-area-inset-bottom));
  }
  .demo-banner {
    font-size: 12px;
    gap: 6px 10px;
    padding: 9px 16px;
    flex-wrap: wrap;
    line-height: 1.6;
  }
  .demo-banner > .icon {
    flex-shrink: 0;
  }
  .demo-banner > span {
    flex: 1;
    min-width: 230px;
    text-align: start;
  }
  .demo-banner > .actions {
    gap: 6px;
    justify-content: center;
    width: 100%;
  }
  .demo-banner .btn.small {
    font-size: 12px;
    padding-inline: 12px;
    min-height: 44px;
  }
}
@media (max-width: 479px) {
  .workspace,
  .finder-page {
    padding-inline: 16px;
  }
  .app-header {
    padding-inline: 16px;
  }
  .header-actions > .badge {
    display: none;
  }
  .header-actions .btn .icon {
    width: 17px;
    height: 17px;
  }
  .stats-grid {
    gap: 10px;
  }
  .stat-card {
    padding: 15px 13px;
  }
  .stat-value {
    font-size: 27px;
  }
  .stat-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
  }
  .stat-icon .icon {
    width: 16px;
    height: 16px;
  }
  .welcome-copy h2 {
    font-size: 25px;
  }
  .welcome-banner {
    padding: 24px 21px;
  }
  .welcome-banner .actions {
    width: 100%;
  }
  .welcome-banner .actions .btn {
    flex: 1;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .finder-page .pet-cover,
  .profile-layout .pet-cover {
    height: 285px;
  }
  .form-actions {
    flex-wrap: wrap;
  }
  .form-actions .btn {
    flex: 1;
  }
  .steps {
    gap: 7px;
  }
  .step {
    gap: 6px;
    font-size: 11px;
  }
  .step::before {
    width: 27px;
    height: 27px;
  }
  .step::after {
    margin: 0;
  }
  .badge {
    font-size: 10px;
    padding-inline: 7px;
  }
  .owner-summary {
    padding: 13px;
    gap: 10px;
  }
  .owner-summary > .icon {
    padding: 7px;
    width: 18px;
    height: 18px;
  }
  .owner-summary .badge {
    white-space: normal;
  }
}
@media (max-width: 359px) {
  .app-header {
    padding-inline: 12px;
  }
  .workspace,
  .finder-page {
    padding-inline: 12px;
  }
  .header-actions .btn {
    padding-inline: 8px;
  }
  .brand-name {
    font-size: 19px;
  }
  .brand-mark {
    width: 35px;
    height: 35px;
  }
  .brand-caption {
    font-size: 9px;
  }
  .stat-card {
    padding: 13px 11px;
  }
  .stat-icon {
    display: none;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .welcome-banner {
    padding: 22px 18px;
  }
  .steps {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .step::after {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .skeleton::after {
    display: none;
  }
}
@media print {
  @page {
    margin: 16mm;
    size: A4;
  }
  body {
    background: white;
    color: black;
    padding: 0;
    font-size: 12pt;
  }
  body.printing > * {
    display: none !important;
  }
  body.printing .print-sheet,
  body.printing .print-only {
    display: block !important;
  }
  body.printing > #print-area {
    display: block !important;
  }
  body.printing .print-sheet {
    border: 2px dashed #152d29;
    margin: 12mm auto;
    padding: 15mm;
    break-inside: avoid;
  }
  body.printing .print-sheet * {
    visibility: visible;
  }
  body.printing > #print-area {
    max-width: none;
    padding: 0;
    border: 0;
    margin: 0;
  }
  .print-tag {
    break-after: page;
    break-inside: avoid;
    page-break-after: always;
    padding: 12mm;
    border: 1px dashed #8c9d88;
    text-align: center;
  }
  .print-tag:last-child {
    break-after: auto;
    page-break-after: auto;
  }
  .print-tag h2 {
    font-size: 24pt;
    margin-block: 10mm;
  }
  .print-tag p {
    max-width: 130mm;
    margin-inline: auto;
    font-size: 11pt;
    overflow-wrap: anywhere;
  }
  .print-tag .qr-render,
  .print-tag .qr-render canvas,
  .print-tag .qr-render img,
  .print-tag .qr-render svg {
    width: 200px;
    max-width: 200px;
    height: auto;
    margin-inline: auto;
  }
  .lost-poster {
    text-align: center;
    break-inside: avoid;
  }
  .lost-poster h1 {
    font-size: 44pt;
    margin-bottom: 7mm;
  }
  .lost-poster h2 {
    font-size: 32pt;
    margin-block: 4mm;
  }
  .lost-poster .poster-photo img {
    width: 300px;
    max-width: 300px;
    height: 240px;
    object-fit: cover;
    border-radius: 12px;
    margin: 5mm auto;
  }
  .lost-poster .poster-phone {
    display: block;
    font-size: 31pt;
    margin: 6mm auto;
  }
  .lost-poster .qr-render,
  .lost-poster .qr-render > * {
    width: 150px;
    max-width: 150px;
    height: auto;
    margin: 5mm auto;
  }
  .lost-poster p {
    font-size: 13pt;
    max-width: 155mm;
    margin-inline: auto;
  }
  .app-header,
  .sidebar,
  .mobile-nav,
  .finder-sticky,
  .demo-banner,
  .toast,
  .skip-link,
  .btn,
  .modal {
    display: none !important;
  }
}
