:root {
  --primary: #5c7d46;
  --secondary: #abc28a;
  --light: #e7f1e2;
  --dark: #1a1a1a;
  --danger: #be123c;
  --warning: #a16207;
  --success: #166534;
  --muted: #718096;
  --muted-strong: #475569;
  --border: #dce8d3;
  --surface: #ffffff;
  --surface-soft: #f8fbf6;
  --shadow: 0 20px 48px rgba(28, 43, 17, 0.11);
  --line-soft: rgba(171, 194, 138, 0.24);
  --line-medium: rgba(171, 194, 138, 0.32);
  --line-strong: rgba(171, 194, 138, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: var(--dark);
  background:
    radial-gradient(circle at 12% 8%, rgba(171, 194, 138, 0.46), transparent 34%),
    radial-gradient(circle at 88% 82%, rgba(92, 125, 70, 0.18), transparent 42%),
    linear-gradient(180deg, #f7fbf3 0%, #ffffff 62%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(171, 194, 138, 0.28);
  box-shadow: 0 8px 26px rgba(33, 50, 19, 0.06);
}

.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.menu-toggle,
.close-sidebar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--light);
  color: var(--primary);
  border: 1px solid rgba(171, 194, 138, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.menu-toggle:hover,
.close-sidebar:hover {
  transform: translateY(-1px);
  background: rgba(171, 194, 138, 0.45);
}

.menu-lines,
.menu-lines::before,
.menu-lines::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
  content: "";
}

.menu-lines::before {
  transform: translateY(-6px);
}

.menu-lines::after {
  transform: translateY(4px);
}

.brand-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
}

.brand-logo {
  width: 176px;
}

.service-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.service-dot,
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 0 rgba(92, 125, 70, 0.5);
  animation: pulse 1.8s infinite;
  will-change: box-shadow;
}

.layout-frame {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.sidebar-layer {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  pointer-events: none;
}

.sidebar-layer.is-open {
  pointer-events: auto;
}

.sidebar-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 28, 13, 0.42);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.sidebar-layer.is-open .sidebar-backdrop {
  opacity: 1;
}

.sidebar {
  position: relative;
  z-index: 1;
  width: 264px;
  max-width: calc(100vw - 24px);
  height: 100%;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 30px 55px rgba(24, 34, 15, 0.18);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  transform: translateX(-110%);
  transition: transform 0.28s ease;
}

.sidebar-layer.is-open .sidebar {
  transform: translateX(0);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(171, 194, 138, 0.28);
}

.sidebar-logo {
  width: 110px;
}

.owner-card {
  margin: 10px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(231, 241, 226, 0.7);
  border-radius: 14px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.owner-name {
  font-size: 13px;
  font-weight: 800;
}

.owner-district {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.sidebar-nav,
.scan-shortcuts {
  display: grid;
  gap: 5px;
}

.sidebar-nav-group + .sidebar-nav-group {
  margin-top: 4px;
}

.nav-btn,
.shortcut-btn,
.action-btn,
.secondary-btn,
.danger-btn,
.ghost-btn,
.whatsapp-btn {
  border-radius: 16px;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.nav-btn,
.shortcut-btn {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  background: #fbfdf9;
  border: 1px solid rgba(171, 194, 138, 0.24);
  color: var(--dark);
}

.nav-btn {
  min-height: 40px;
}

.nav-btn:hover,
.shortcut-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.action-btn:hover,
.danger-btn:hover,
.whatsapp-btn:hover {
  transform: translateY(-1px);
}

.nav-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 14px 30px rgba(92, 125, 70, 0.2);
}

.nav-badge {
  float: right;
  min-width: 20px;
  padding: 2px 6px;
  font-size: 10px;
  text-align: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.nav-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.nav-label-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.nav-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  background: rgba(171, 194, 138, 0.23);
  color: #304223;
}

.nav-btn.active .nav-icon {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.sidebar-section-title {
  margin: 10px 0 6px;
  font-size: 10px;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.shortcut-btn {
  background: rgba(231, 241, 226, 0.62);
  color: var(--primary);
  font-size: 11px;
}

.logout-btn {
  margin-top: 10px;
  width: 100%;
}

.qr-scanner-layer {
  position: fixed;
  inset: 0;
  z-index: 2600;
  background: rgba(6, 10, 5, 0.92);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 0;
}

.qr-scanner-shell {
  position: relative;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  background: #000;
}

.qr-scanner-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.qr-scanner-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: max(14px, env(safe-area-inset-top)) 14px 10px;
  display: flex;
  justify-content: flex-end;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%);
}

.qr-scanner-close {
  min-width: 88px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(12, 16, 10, 0.58);
  color: #fff;
}

.qr-scanner-frame {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(70vw, 340px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, 0.84);
  border-radius: 18px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.32);
  pointer-events: none;
}

.qr-scanner-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 14px max(16px, env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58) 0%, rgba(0, 0, 0, 0) 100%);
}

.qr-scanner-status {
  font-size: 12px;
  line-height: 1.45;
  border-radius: 10px;
  padding: 9px 11px;
  font-weight: 700;
  max-width: min(92vw, 560px);
  margin: 0 auto;
}

.qr-scanner-status.info {
  color: #36511f;
  background: rgba(231, 241, 226, 0.92);
}

.qr-scanner-status.success {
  color: #14532d;
  background: #dcfce7;
}

.qr-scanner-status.warning {
  color: #9a3412;
  background: #ffedd5;
}

.sidebar-footer {
  padding-top: 10px;
  border-top: 1px solid rgba(171, 194, 138, 0.25);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.panel {
  max-width: 1200px;
  margin: 0 auto;
}

.hero,
.banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.section-title {
  margin: 0;
  font-size: clamp(30px, 3.6vw, 38px);
  line-height: 1.02;
  font-weight: 900;
}

.section-title-md {
  font-size: 30px;
}

.section-desc {
  margin: 8px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.grid {
  display: grid;
  gap: 20px;
}

.pet-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.admin-stack {
  gap: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.stat-card {
  padding: 18px;
  background: var(--surface);
  border: 1px solid rgba(171, 194, 138, 0.32);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.stat-card span,
.stat-card small {
  display: block;
}

.stat-card span {
  font-size: 11px;
  font-weight: 900;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-card strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 34px;
  line-height: 1;
}

.stat-card.warn strong {
  color: var(--warning);
}

.stat-card.danger strong {
  color: var(--danger);
}

.stat-card small {
  color: var(--muted);
  font-size: 12px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(171, 194, 138, 0.2);
}

.list-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.compact-btn {
  padding: 10px 12px;
  font-size: 12px;
}

.admin-table-wrap {
  background: var(--surface);
  border: 1px solid rgba(171, 194, 138, 0.32);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.admin-users-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 0.8fr) minmax(240px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.admin-users-count {
  justify-self: end;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-users-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.admin-users-table thead th {
  background: rgba(231, 241, 226, 0.62);
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: left;
  padding: 16px 20px;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}

.admin-users-table tbody td {
  padding: 16px 20px;
  vertical-align: top;
  border-top: 1px solid rgba(171, 194, 138, 0.18);
}

.admin-users-table tbody tr:hover {
  background: rgba(248, 251, 246, 0.72);
}

.admin-users-table thead th:first-child,
.admin-users-table tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
  box-shadow: 1px 0 0 rgba(171, 194, 138, 0.22);
}

.admin-users-table thead th:first-child {
  z-index: 3;
  background: rgba(231, 241, 226, 0.98);
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(231, 241, 226, 0.68);
  color: var(--primary);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.chip.warn {
  background: #fef3c7;
  color: var(--warning);
}

.chip.ok {
  background: #dcfce7;
  color: var(--success);
}

.admin-scan-list {
  max-height: none;
}

.card,
.map-wrap,
.scan-list,
.profile-shell,
.finder-card,
.finder-notice,
.surface-card {
  background: var(--surface);
  border: 1px solid var(--line-medium);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.card {
  overflow: hidden;
}

.pet-grid .actions {
  gap: 8px;
}

.pet-grid .actions > * {
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.15;
  min-height: 42px;
}

.admin-stack .pet-grid .actions {
  flex-direction: column;
}

.admin-stack .pet-grid .actions > * {
  width: 100%;
}

.admin-pets-table {
  grid-template-columns: 1fr;
  gap: 14px;
}

.admin-pet-row {
  border-radius: 22px;
}

.admin-pet-row .status {
  padding: 12px 16px;
}

.admin-pet-row-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.admin-pet-main {
  flex-direction: row;
  align-items: center;
  gap: 14px;
}

.admin-pet-main .pet-photo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
}

.admin-pet-copy {
  text-align: left;
}

.admin-pet-actions {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-pet-actions > * {
  width: auto;
  white-space: nowrap;
}

.admin-stack .pet-grid .admin-pet-actions {
  flex-direction: row;
}

.admin-stack .pet-grid .admin-pet-actions > * {
  width: auto;
}

.admin-pet-row .status {
  flex-direction: row;
  align-items: center;
}

.card-body,
.profile-body,
.surface-body {
  padding: 20px;
}

.status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid rgba(171, 194, 138, 0.25);
}

.status.safe {
  background: rgba(231, 241, 226, 0.8);
  color: var(--primary);
}

.status.lost {
  background: #fff1f2;
  color: var(--danger);
}

.status-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.danger-btn,
.secondary-btn,
.action-btn,
.ghost-btn,
.whatsapp-btn {
  padding: 12px 15px;
}

.action-btn {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 16px 32px rgba(92, 125, 70, 0.2);
}

.secondary-btn {
  background: #f7faf5;
  color: #223019;
  border: 1px solid #dbe6d3;
}

.danger-btn {
  background: var(--danger);
  color: #fff;
}

.ghost-btn {
  background: transparent;
  color: var(--muted-strong);
  border: 1px solid rgba(171, 194, 138, 0.3);
}

.whatsapp-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: #22c55e;
  color: #fff;
}

.pet-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.pet-copy {
  min-width: 0;
  flex: 1;
  width: 100%;
  text-align: center;
}

.admin-pet-row .admin-pet-main {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.admin-pet-row .admin-pet-main .pet-photo {
  width: 68px;
  height: 68px;
  border-radius: 14px;
}

.admin-pet-row .admin-pet-copy {
  width: auto;
  text-align: left;
}

.admin-pet-row .admin-pet-copy strong {
  line-height: 1.15;
}

.admin-pet-row .admin-pet-copy .pet-id {
  display: block;
  margin-top: 3px;
  margin-bottom: 5px;
}

.admin-pet-row .admin-pet-copy .muted,
.admin-pet-row .admin-pet-copy .pet-district {
  text-align: left;
}

.admin-pet-row .admin-pet-row-body {
  grid-template-columns: minmax(340px, 1fr) auto;
  gap: 14px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.pet-photo {
  width: 88px;
  height: 88px;
  flex: 0 0 auto;
  border-radius: 20px;
  object-fit: cover;
  border: 1px solid rgba(171, 194, 138, 0.34);
  background: var(--light);
}

.pet-photo.is-empty {
  background: #f8fbf6;
}

.pet-photo-placeholder {
  display: grid;
  place-items: center;
  border-style: dashed;
  border-color: rgba(126, 150, 102, 0.45);
  background: linear-gradient(135deg, #f8fbf6 0%, #eef6e7 100%);
}

.pet-photo-placeholder span {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #5a6f47;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.pet-copy strong {
  display: block;
  font-size: 19px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.pet-copy .muted {
  margin-top: 5px;
  text-align: center;
}

.pet-owner-line {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pet-id {
  display: inline-block;
  margin-top: 8px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  word-break: break-word;
}

.pet-district {
  margin-top: 7px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.actions > * {
  flex: 1;
}

@media (max-width: 1120px) {
  .pet-grid .actions {
    flex-direction: column;
  }

  .pet-grid .actions > * {
    width: 100%;
  }
}

.qr-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px;
  background: #f8faf7;
  border-top: 1px solid var(--line-soft);
}

.qr-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qr-meta img {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  border: 1px solid rgba(171, 194, 138, 0.38);
  background: #fff;
}

.qr-thumb {
  cursor: zoom-in;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.qr-thumb:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 18px rgba(26, 26, 26, 0.16);
}

.qr-title,
.qr-subtitle {
  display: block;
  font-size: 10px;
}

.qr-title {
  color: #94a3b8;
  font-weight: 700;
}

.qr-subtitle {
  color: var(--primary);
  font-weight: 800;
}

.qr-tag {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.qr-modal-layer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(20, 28, 13, 0.72);
  backdrop-filter: blur(5px);
}

.qr-modal {
  width: min(92vw, 520px);
  background: #fff;
  border: 1px solid rgba(171, 194, 138, 0.36);
  border-radius: 24px;
  box-shadow: 0 24px 54px rgba(16, 24, 9, 0.34);
  padding: 16px;
}

.qr-close {
  display: inline-flex;
  margin-left: auto;
}

.qr-modal-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin-top: 12px;
  border-radius: 16px;
  border: 1px solid rgba(171, 194, 138, 0.3);
  background: #fff;
}

.qr-modal-id {
  margin-top: 12px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.edit-panel {
  padding: 20px;
  background: rgba(231, 241, 226, 0.24);
}

.edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(171, 194, 138, 0.25);
  margin-bottom: 16px;
}

.edit-title {
  font-size: 12px;
  color: var(--primary);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid.single,
.row {
  margin-top: 14px;
}

.field,
textarea,
select {
  width: 100%;
  padding: 12px 13px;
  border-radius: 16px;
  border: 1px solid rgba(171, 194, 138, 0.48);
  background: #fff;
  color: var(--dark);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(92, 125, 70, 0.12);
}

.file-picker {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(171, 194, 138, 0.48);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbf6 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.file-picker:hover {
  transform: translateY(-1px);
  border-color: rgba(92, 125, 70, 0.46);
  box-shadow: 0 10px 24px rgba(33, 50, 19, 0.08);
}

.file-picker:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(92, 125, 70, 0.12);
}

.file-picker-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 24px rgba(92, 125, 70, 0.2);
}

.file-picker-meta {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.file-picker-name {
  color: #25351a;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  word-break: break-word;
}

.file-picker-hint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.file-picker-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.photo-preview-shell {
  margin-top: 14px;
  padding: 14px;
  border-radius: 20px;
  border: 1px dashed rgba(171, 194, 138, 0.55);
  background: linear-gradient(180deg, rgba(248, 251, 246, 0.96) 0%, rgba(237, 243, 232, 0.96) 100%);
}

.photo-preview-label {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.photo-preview-image {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(171, 194, 138, 0.35);
  box-shadow: 0 12px 24px rgba(33, 50, 19, 0.12);
  background: #fff;
}

.photo-preview-empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 700;
}

label {
  display: block;
  margin-bottom: 7px;
  color: #25351a;
  font-size: 12px;
  font-weight: 800;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.profile-shell,
.surface-card {
  max-width: 860px;
}

.profile-summary,
.map-wrap,
.scan-list,
.finder-panel {
  padding: 18px;
}

.profile-item,
.scan-item {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line-soft);
}

.profile-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: 22px;
  background: rgba(231, 241, 226, 0.7);
}

.profile-badge {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(171, 194, 138, 0.35);
  color: var(--primary);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profile-item {
  background: #f9fbf8;
}

.profile-item span {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.profile-item strong {
  font-size: 13px;
}

.alerts-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 20px;
}

.map-title,
.panel-title {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.map-box {
  position: relative;
}

#map {
  width: 100%;
  min-height: 410px;
  border-radius: 22px;
  border: 1px solid rgba(171, 194, 138, 0.34);
}

.map-caption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(26, 26, 26, 0.88);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.scan-list {
  max-height: 520px;
  overflow: auto;
}

.scan-item {
  background: rgba(231, 241, 226, 0.35);
  cursor: pointer;
}

.scan-item + .scan-item {
  margin-top: 12px;
}

.scan-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 900;
  color: var(--primary);
}

.scan-time {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.scan-device {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #94a3b8;
  font-size: 10px;
}

.scan-mode {
  color: var(--success);
  font-weight: 800;
}

.empty-state {
  padding: 46px 12px;
  text-align: center;
  color: var(--muted);
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: var(--muted-strong);
}

.finder {
  max-width: 760px;
  margin: 0 auto;
}

.finder-notice {
  display: flex;
  gap: 12px;
  padding: 18px;
  margin-bottom: 16px;
}

.finder-notice.warn {
  background: #fff1f2;
  color: #881337;
}

.finder-notice.ok {
  background: var(--primary);
  color: #fff;
}

.finder-card {
  overflow: hidden;
}

.finder-hero {
  position: relative;
  min-height: 300px;
  background: var(--dark);
}

.finder-hero.is-empty {
  background: #f8fbf6;
}

.finder-hero img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.finder-empty-photo {
  width: 100%;
  height: 300px;
}

.finder-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.72) 100%);
}

.finder-overlay.is-hidden {
  display: none;
}

.finder-hero.is-empty .finder-copy {
  color: var(--dark);
}

.finder-copy {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
  color: #fff;
}

.finder-tag {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 9px;
  background: var(--secondary);
  color: var(--dark);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.finder-name {
  margin: 10px 0 4px;
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
}

.finder-body {
  padding: 20px;
}

.finder-panel {
  border-bottom: 1px solid rgba(171, 194, 138, 0.22);
}

.finder-panel.warn {
  background: rgba(255, 241, 242, 0.55);
}

.finder-panel.soft {
  background: rgba(231, 241, 226, 0.22);
}

.finder-panel.center {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.finder-heading {
  margin: 0;
  font-size: 13px;
  font-weight: 900;
}

.finder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.finder-detail {
  padding: 14px;
  border-radius: 18px;
  background: #f8faf7;
  border: 1px solid rgba(171, 194, 138, 0.18);
}

.finder-detail span {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.finder-vaccines {
  display: grid;
  gap: 7px;
}

.finder-vaccines div {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted-strong);
}

.finder-vaccines i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--primary);
  display: inline-block;
}

.center-actions {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}

.alert {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 60;
  width: min(360px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(171, 194, 138, 0.35);
  box-shadow: 0 22px 38px rgba(26, 35, 16, 0.18);
  color: var(--dark);
  font-size: 13px;
  font-weight: 700;
}

.alert.error {
  border-color: rgba(190, 18, 60, 0.22);
}

.alert.warning {
  border-color: rgba(161, 98, 7, 0.25);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(231, 241, 226, 0.9);
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(100%, 420px);
  padding: 24px 22px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line-medium);
  border-radius: 28px;
  box-shadow: 0 30px 58px rgba(26, 36, 16, 0.14);
}

.login-logo {
  width: 172px;
  margin-bottom: 10px;
}

.login-card h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
}

.login-card p {
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.login-form {
  display: grid;
  gap: 8px;
}

.auth-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.auth-switch-btn {
  border: 1px solid rgba(171, 194, 138, 0.4);
  border-radius: 14px;
  background: #fff;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
  padding: 10px 12px;
  cursor: pointer;
}

.auth-switch-btn.active {
  background: rgba(231, 241, 226, 0.9);
  color: var(--primary);
  border-color: rgba(92, 125, 70, 0.45);
}

.hidden {
  display: none !important;
}

.login-btn {
  width: 100%;
  margin-top: 6px;
}

.login-error {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 13px;
}

.public-scan-page {
  padding: 18px;
  align-items: start;
}

.public-scan-card {
  position: relative;
  overflow: hidden;
  width: min(100%, 620px);
  border-radius: 20px;
  border: 1px solid #dbe3d4;
  background: #f8faf8;
  box-shadow: 0 18px 36px rgba(31, 47, 19, 0.16);
}

.public-scan-card .login-logo {
  width: 118px;
  margin: 8px 0 6px;
}

.public-scan-card h1 {
  margin-top: 0;
}

.public-scan-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, #f1893f 0%, #dc4b41 100%);
}

.public-scan-lead {
  margin-bottom: 14px;
  max-width: 46ch;
  color: #3e4a59;
  font-size: 14px;
  line-height: 1.45;
}

.scan-state {
  min-height: 44px;
  margin: 0 0 12px;
  padding: 11px 12px;
  border-radius: 7px;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.scan-state::before {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 0;
  flex: 0 0 auto;
}

.scan-state.state-info {
  border-color: #bcd0ea;
  background: #eaf2fb;
  color: #1e3f73;
}

.scan-state.state-info::before {
  content: "";
  background: #4f89d7;
}

.scan-state.state-success {
  border-color: #bcd0ea;
  background: #eaf2fb;
  color: #1e3f73;
}

.scan-state.state-success::before {
  content: "";
  background: #4f89d7;
}

.scan-state.state-danger {
  border-color: #f3bcc7;
  background: #fff2f4;
  color: #9f1239;
}

.scan-state.state-danger::before {
  content: "";
  background: #be123c;
}

.public-pet-card {
  border-radius: 12px;
  border: 1px solid #d8ddd7;
  box-shadow: none;
  background: #fcfdfc;
}

.public-pet-body {
  padding: 14px;
}

.public-pet-header-v2 {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e7e1;
}

.public-photo-shell {
  position: relative;
}

.public-pet-photo {
  width: 118px;
  height: 118px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid #ecf1ea;
  box-shadow: 0 6px 14px rgba(31, 47, 19, 0.2);
}

.public-photo-badge {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e94949 0%, #cf2d2d 100%);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.public-pet-name {
  margin: 0;
  font-size: 40px;
  line-height: 1.02;
  font-weight: 900;
  overflow-wrap: anywhere;
  color: #0f172a;
}

.public-pet-type {
  margin: 0;
  color: #5e6875;
  font-size: 13px;
  font-weight: 600;
}

.public-status-chip {
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.public-status-chip.safe {
  background: #e8f6ed;
  color: #1f7a44;
}

.public-status-chip.lost {
  background: linear-gradient(135deg, #ef4343 0%, #d82e2e 100%);
  color: #fff;
}

.public-info-stack {
  margin-top: 0;
  display: grid;
  gap: 0;
}

.public-info-row {
  padding: 10px 0;
  border-bottom: 1px solid #e2e7e1;
}

.public-info-row:last-child {
  border-bottom: 0;
}

.public-info-row.compact {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.public-info-row.blocky {
  display: block;
}

.public-info-label {
  margin: 0;
  color: #6a7584;
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.public-info-value {
  margin: 0;
  color: #202b3d;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.public-info-value.align-right {
  text-align: right;
}

.public-info-value.is-danger {
  color: #b3261e;
}

.public-info-value.is-safe {
  color: #1d6a3f;
}

.public-section-block {
  margin-top: 12px;
}

.public-section-title {
  margin: 0 0 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid #dde3dd;
  color: #7b8593;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.public-chip-row {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.public-chip {
  padding: 4px 8px;
  border-radius: 6px;
  background: #edf1f7;
  color: #465367;
  font-size: 12px;
  font-weight: 700;
}

.public-chip.muted-chip {
  color: #64748b;
}

.public-owner-box {
  margin-top: 14px;
  padding: 10px 12px 12px;
  border-radius: 9px;
  background: #f6f8f6;
  border: 1px solid #dbe2da;
}

.public-owner-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.public-owner-title {
  margin: 0;
  color: #6d7786;
  font-size: 11px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.public-owner-name {
  margin: 3px 0 0;
  font-size: 18px;
  font-weight: 900;
  color: #0f172a;
}

.public-owner-phone {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #d6e0d1;
  background: #fefefe;
  font-size: 13px;
  font-weight: 800;
  color: #648253;
}

.public-owner-phone::before {
  content: "\260E";
  font-size: 14px;
}

.public-owner-contact-wrap {
  display: flex;
  align-items: center;
}

.scan-share-btn {
  margin-top: 14px;
  min-height: 48px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
  background: linear-gradient(180deg, #648d4d 0%, #567b43 100%);
  box-shadow: 0 10px 22px rgba(44, 67, 33, 0.24);
}

.scan-share-btn::before {
  content: "\1F4CD";
  margin-right: 8px;
  font-size: 14px;
}

.scan-share-btn:disabled {
  opacity: 0.72;
}

.landing-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.landing-shell {
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 24px;
  align-items: stretch;
}

.landing-copy,
.landing-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line-medium);
  border-radius: 30px;
  box-shadow: 0 28px 60px rgba(26, 36, 16, 0.12);
}

.landing-copy {
  padding: 34px;
}

.landing-logo {
  width: 190px;
  margin-bottom: 16px;
}

.landing-kicker {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(231, 241, 226, 0.9);
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.landing-copy h1 {
  margin: 18px 0 10px;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 0.98;
  font-weight: 900;
  max-width: 11ch;
}

.landing-copy p {
  margin: 0;
  max-width: 60ch;
  color: var(--muted-strong);
  font-size: 15px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.landing-actions .action-btn,
.landing-actions .secondary-btn {
  min-width: 190px;
  text-align: center;
}

.landing-metrics {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.landing-metric {
  padding: 16px;
  border-radius: 20px;
  background: rgba(248, 251, 246, 0.94);
  border: 1px solid rgba(171, 194, 138, 0.22);
}

.landing-metric strong {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
}

.landing-metric span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.landing-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.landing-card-head {
  display: flex;
  justify-content: flex-end;
}

.landing-preview {
  display: grid;
  gap: 16px;
}

.landing-preview-photo {
  width: 78px;
  height: 78px;
  border-radius: 22px;
  background: rgba(231, 241, 226, 0.82);
  display: grid;
  place-items: center;
}

.landing-preview-photo img {
  width: 48px;
  height: 48px;
}

.landing-preview-tag {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.landing-preview h2 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.05;
}

.landing-preview p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.landing-stack {
  display: grid;
  gap: 12px;
}

.landing-stack-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border-radius: 18px;
  background: rgba(248, 251, 246, 0.94);
  border: 1px solid rgba(171, 194, 138, 0.2);
}

.landing-stack-item span {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.landing-stack-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.landing-stack-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.loading-shell {
  max-width: 760px;
  margin: 40px auto;
}

.skeleton-heading,
.skeleton-copy,
.skeleton-card {
  border-radius: 16px;
  background: linear-gradient(110deg, rgba(171, 194, 138, 0.15) 8%, rgba(171, 194, 138, 0.35) 18%, rgba(171, 194, 138, 0.15) 33%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s linear infinite;
  will-change: background-position;
}

.skeleton-heading {
  width: min(560px, 92%);
  height: 34px;
}

.skeleton-copy {
  margin-top: 12px;
  width: min(680px, 96%);
  height: 16px;
}

.skeleton-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.skeleton-card {
  height: 180px;
}

.global-loader {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(247, 251, 243, 0.75);
  backdrop-filter: blur(6px);
}

.global-loader-card {
  width: min(420px, calc(100vw - 32px));
  padding: 22px 20px;
  border-radius: 24px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 54px rgba(26, 36, 16, 0.18);
  display: grid;
  justify-items: center;
  gap: 12px;
}

.global-loader-logo {
  width: min(210px, 62vw);
  height: auto;
}

.global-loader-spinner {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 4px solid rgba(171, 194, 138, 0.38);
  border-top-color: var(--primary);
  animation: spinner-rotate 0.85s linear infinite;
  will-change: transform;
}

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

.global-loader-text {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(92, 125, 70, 0.52);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(92, 125, 70, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(92, 125, 70, 0);
  }
}

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

@keyframes skeleton-shimmer {
  to {
    background-position-x: -200%;
  }
}

@media (max-width: 900px) {
  .admin-grid,
  .hero,
  .banner {
    display: none;
  }

  .alerts-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-users-toolbar {
    grid-template-columns: 1fr;
  }

  .admin-users-count {
    justify-self: start;
  }

  .admin-users-table {
    min-width: 760px;
  }

  .profile-grid,
  .finder-grid,
  .form-grid,
  .actions {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .landing-shell,
  .landing-metrics {
    grid-template-columns: 1fr;
  }

  .topbar-inner {
    padding-inline: 14px;
  }

  .layout-frame {
    padding-inline: 12px;
  }

  .section-title {
    font-size: 28px;
    line-height: 1.08;
  }

  .section-title-md {
    font-size: 28px;
  }

  .status {
    align-items: flex-start;
  }

  .status .danger-btn,
  .status .secondary-btn {
    width: 100%;
  }

  .actions > * {
    width: 100%;
  }

  .admin-stack .pet-grid .admin-pet-actions > * {
    width: auto;
  }

  .admin-pet-row .admin-pet-row-body {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 12px;
  }

  .admin-pet-row .status {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
  }

  .admin-pet-row .admin-pet-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .admin-stack .pet-grid .admin-pet-actions > * {
    width: 100%;
    white-space: normal;
  }

  .qr-strip {
    align-items: flex-start;
  }

  #map {
    min-height: 320px;
  }

  .finder-hero img {
    height: 240px;
  }

  .finder-name {
    font-size: 28px;
  }
}

@media (max-width: 560px) {
  .login-card,
  .card-body,
  .profile-body,
  .surface-body,
  .finder-body,
  .finder-panel,
  .scan-list,
  .map-wrap {
    padding: 16px;
  }

  .owner-card,
  .profile-summary,
  .qr-strip,
  .pet-head {
    align-items: flex-start;
  }

  .sidebar {
    width: min(360px, calc(100vw - 10px));
    max-width: calc(100vw - 10px);
    padding: 18px;
  }

  .nav-btn,
  .shortcut-btn {
    padding: 13px;
  }

  .nav-label-main {
    font-size: 15px;
  }

  .status {
    flex-direction: column;
    gap: 10px;
  }

  .status-text {
    width: 100%;
  }

  .pet-head {
    flex-direction: column;
  }

  .pet-photo {
    width: 100%;
    height: 170px;
  }

  .admin-pet-row-body {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .admin-pet-row .admin-pet-main {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .admin-pet-row .admin-pet-main .pet-photo {
    width: 64px;
    height: 64px;
    border-radius: 14px;
  }

  .admin-pet-row .admin-pet-copy {
    text-align: left;
  }

  .admin-pet-row .status {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .admin-pet-actions {
    justify-content: flex-start;
  }

  .admin-stack .pet-grid .admin-pet-actions > * {
    width: auto;
  }

  .admin-pet-row .admin-pet-row-body {
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .admin-pet-row .admin-pet-actions {
    grid-template-columns: 1fr;
  }

  .admin-stack .pet-grid .admin-pet-actions > * {
    width: 100%;
  }

  .qr-strip {
    flex-direction: column;
  }

  .qr-meta {
    width: 100%;
  }

  .scan-name,
  .scan-device {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-inner {
    gap: 10px;
  }

  .brand-logo {
    width: 148px;
  }

  .service-pill span:last-child {
    display: none;
  }

  .finder-copy {
    left: 18px;
    right: 18px;
    bottom: 18px;
  }

  .finder-name {
    font-size: 24px;
  }

  .alert {
    top: 10px;
    right: 10px;
    width: calc(100vw - 20px);
  }

  .landing-copy,
  .landing-card {
    border-radius: 22px;
  }

  .landing-copy {
    padding: 20px;
  }

  .landing-copy h1 {
    font-size: clamp(30px, 10vw, 40px);
    max-width: 100%;
  }

  .landing-actions .action-btn,
  .landing-actions .secondary-btn {
    min-width: 0;
    width: 100%;
  }

  .public-scan-page {
    padding: 12px;
    place-items: stretch;
  }

  .public-scan-card {
    width: 100%;
    border-radius: 18px;
    padding: 18px;
  }

  .scan-state {
    font-size: 13px;
    padding: 10px;
  }

  .scan-state::before {
    width: 12px;
    height: 12px;
    border-radius: 999px;
  }

  .public-pet-body {
    padding: 14px;
  }

  .public-pet-header-v2 {
    gap: 7px;
  }

  .public-pet-photo {
    width: 118px;
    height: 118px;
  }

  .public-pet-name {
    font-size: 34px;
  }

  .public-info-stack {
    gap: 0;
  }

  .public-info-row {
    padding: 9px 0 10px;
  }

  .public-info-value {
    font-size: 17px;
  }

  .public-owner-name {
    font-size: 17px;
  }

  .public-owner-row {
    align-items: center;
  }

  .scan-share-btn {
    font-size: 17px;
    min-height: 46px;
  }
}
