:root {
  color-scheme: light;
  --bg: #f3f6f4;
  --panel: #ffffff;
  --ink: #16211d;
  --muted: #65736f;
  --line: #d8e2de;
  --line-strong: #b8c7c1;
  --green: #12715f;
  --green-dark: #0e5147;
  --blue: #3454a4;
  --amber: #b87512;
  --rose: #b4233c;
  --shadow: 0 14px 34px rgba(24, 38, 34, 0.08);
  --shadow-lift: 0 18px 38px rgba(24, 38, 34, 0.12);
  --ease-standard: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-swift: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 160ms var(--ease-swift);
  --transition-base: 240ms var(--ease-standard);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
}

.nav button,
.side-action,
.panel,
.stat,
.login-box,
.modal,
.btn,
.input,
.select,
table tbody tr {
  transition:
    box-shadow var(--transition-base),
    border-color var(--transition-fast),
    background-color var(--transition-fast),
    color var(--transition-fast),
    opacity var(--transition-fast);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 262px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 14px;
  background: #14231f;
  color: #eef8f4;
}

.brand-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-panel {
  display: grid;
  align-items: stretch;
  gap: 8px;
}

.brand-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-inline strong,
.brand-inline span {
  display: block;
}

.brand-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-inline span {
  color: #adc0ba;
  font-size: 12px;
  margin-top: 2px;
}

.account-email {
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  align-self: start;
  display: block;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #eef8f4;
  font-weight: 650;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #30b79d, #f0b84a);
  color: #10211d;
  font-weight: 950;
  overflow: hidden;
  flex: 0 0 42px;
}

.brand-mark.image {
  background: #ffffff;
  padding: 3px;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.nav {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 6px;
}

.nav button,
.side-action {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: transparent;
  color: #d9e8e2;
  cursor: pointer;
  text-align: left;
  font-weight: 750;
}

.nav button:hover,
.nav button.active,
.side-action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav button:focus-visible,
.side-action:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.limit-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.limit-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.limit-box span,
.limit-box small {
  color: #adc0ba;
  font-size: 12px;
}

.limit-box em {
  color: #f0b84a;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.limit-value {
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0;
}

.limit-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.limit-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #30b79d, #f0b84a);
}

.limit-box.warn .limit-fill {
  background: #f0b84a;
}

.limit-box.danger .limit-fill {
  background: #f07d7d;
}

.limit-box.danger em {
  color: #f2a6a6;
}

.main {
  min-width: 0;
}

.topbar {
  min-height: 76px;
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
}

.topbar h1,
.panel h2,
.login-box h2 {
  margin: 0;
}

.topbar p,
.panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.toolbar,
.actions,
.pager {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.content {
  display: grid;
  gap: 16px;
  padding: 22px 24px 34px;
}

.panel,
.stat,
.login-box {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel {
  overflow: hidden;
}

.panel:hover,
.stat:hover,
.login-box:hover {
  border-color: color-mix(in srgb, var(--line-strong) 72%, var(--green));
  box-shadow: 0 16px 32px rgba(24, 38, 34, 0.09);
}

.panel-head {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-body,
.filters {
  padding: 16px;
}

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

.stat {
  min-height: 118px;
  display: grid;
  align-content: space-between;
  padding: 16px;
  border-left: 4px solid var(--green);
}

.stat:nth-child(2) {
  border-left-color: var(--blue);
}

.stat:nth-child(3) {
  border-left-color: var(--amber);
}

.stat:nth-child(4) {
  border-left-color: #253447;
}

.stat span,
.stat small,
.muted,
.file-note {
  color: var(--muted);
}

.stat strong {
  font-size: 32px;
}

.filters {
  display: grid;
  grid-template-columns: 1.4fr 180px 170px 170px auto;
  gap: 10px;
  align-items: end;
  border-bottom: 1px solid var(--line);
}

.batch-list {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.batch {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.batch-head {
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.batch-toggle {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.batch-toggle strong,
.batch-toggle small {
  display: block;
}

.batch-title {
  min-width: 0;
}

.batch-title-row {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.batch-title-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.batch-title-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

.batch-toggle small {
  margin-top: 3px;
  color: var(--muted);
}

.chevron {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #edf4f1;
  color: var(--green-dark);
  font-weight: 950;
  flex: 0 0 30px;
}

.batch-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.batch-actions .btn.icon-only {
  flex: 0 0 38px;
}

.batch-table {
  border-top: 1px solid var(--line);
}

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

.field {
  min-width: 0;
  display: grid;
  gap: 6px;
  align-content: start;
}

.field.compact-field {
  align-self: start;
}

.btn:hover:not(:disabled),
.btn:focus-visible {
  box-shadow: 0 12px 24px rgba(24, 38, 34, 0.12);
}

.input:focus-visible,
.select:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--blue) 48%, white);
  box-shadow: 0 0 0 4px rgba(52, 84, 164, 0.12);
}

table tbody tr:hover {
  background: #f8fbfa;
}

.field.wide {
  grid-column: 1 / -1;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.input,
.select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.shop-url-input {
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  line-height: 20px;
  resize: none;
}

.input::placeholder {
  color: #8a9994;
  opacity: 1;
}

.select.mini {
  width: 78px;
  min-height: 36px;
}

.input:focus,
.select:focus {
  outline: 3px solid rgba(18, 113, 95, 0.16);
  border-color: var(--green);
}

.input[type="file"] {
  min-height: 48px;
  padding: 0;
  border-style: dashed;
  background: linear-gradient(180deg, #ffffff 0%, #f6faf8 100%);
  color: var(--muted);
  cursor: pointer;
}

.input[type="file"]::file-selector-button {
  min-height: 46px;
  margin: 0 12px 0 0;
  padding: 0 16px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #e4efeb;
  color: var(--ink);
  font-weight: 850;
  cursor: pointer;
}

.input[type="file"]:hover::file-selector-button {
  background: #d7ebe4;
}

.mini-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.mini-check input {
  width: 16px;
  height: 16px;
}

.logo-preview-wrap {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-preview {
  max-width: 160px;
  max-height: 68px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}

.wide-image-preview .logo-preview {
  max-width: 240px;
  max-height: 92px;
}

.design-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr);
  gap: 16px;
  align-items: start;
}

.design-settings,
.design-preview-panel {
  min-height: 100%;
}

.design-preview-panel {
  position: sticky;
  top: 92px;
}

.qr-page-preview {
  display: grid;
  place-items: center;
  padding: 0;
}

.preview-device {
  container-type: inline-size;
  width: 100%;
  min-height: 0;
  overflow: visible;
  border: 1px solid color-mix(in srgb, var(--line) 78%, var(--green));
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  padding: clamp(14px, 2.6cqw, 24px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.preview-lost-banner {
  margin-top: 0;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 8px;
  background: #fff1f3;
  border: 1px solid #ffc7d0;
  color: #74182a;
  box-shadow: 0 14px 28px rgba(116, 24, 42, 0.08);
}

.preview-lost-banner strong {
  display: block;
  font-size: 20px;
}

.preview-lost-banner span {
  display: block;
  margin-top: 4px;
}

.preview-pet-layout {
  margin-top: clamp(14px, 2.8cqw, 20px);
  display: grid;
  grid-template-columns: minmax(240px, 0.88fr) minmax(0, 1.08fr) minmax(230px, 0.78fr);
  gap: clamp(14px, 2.4cqw, 18px);
  align-items: start;
}

.preview-media-column {
  min-width: 0;
}

.preview-pet-photo {
  margin: 0;
  aspect-ratio: 1;
  overflow: hidden;
}

.preview-pet-photo.placeholder {
  position: relative;
  display: grid;
  place-items: center;
  background:
    linear-gradient(155deg, rgba(18, 113, 95, 0.06), rgba(255, 255, 255, 0) 44%),
    linear-gradient(135deg, #edf6f3, #fff8ea);
  color: var(--preview-header);
  font-weight: 950;
}

.preview-photo-shine {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  pointer-events: none;
}

.preview-paw {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--preview-header);
  color: #fff;
  font-weight: 900;
  font-size: 28px;
  box-shadow: 0 14px 28px rgba(18, 33, 29, 0.14);
}

.preview-pet-card,
.preview-owner-card,
.preview-pet-photo {
  border: 1px solid rgba(22, 33, 29, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.preview-device.has-form-border .preview-lost-banner,
.preview-device.has-form-border .preview-pet-card,
.preview-device.has-form-border .preview-owner-card,
.preview-device.has-form-border .preview-pet-photo {
  border-color: var(--preview-form-border-color);
  border-width: var(--preview-form-border-width);
}

.preview-pet-card,
.preview-owner-card {
  min-width: 0;
  padding: clamp(16px, 2.8cqw, 22px);
}

.preview-pet-card h2 {
  margin: 12px 0 16px;
  font-size: clamp(36px, 5.4cqw, 58px);
  line-height: 0.98;
  overflow-wrap: anywhere;
}

.preview-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 10px;
}

.preview-fact {
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px;
  border-radius: 8px;
  background: #f6faf8;
  border: 1px solid var(--line);
}

.preview-fact span,
.preview-contact-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.preview-fact strong,
.preview-contact-row strong,
.preview-contact-row a {
  font-size: 16px;
  font-weight: 850;
  line-height: 1.32;
  overflow-wrap: break-word;
  word-break: normal;
}

.preview-comment {
  margin-top: 14px;
  padding: 14px;
  border-left: 4px solid var(--preview-header);
  background: #fbfdfc;
  border-radius: 8px;
  line-height: 1.5;
}

.preview-owner-card h3 {
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.18;
}

.preview-contact-row {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.preview-contact-row a {
  color: var(--preview-header);
}

.preview-shop-attribution {
  display: grid;
  gap: 5px;
  margin: 16px auto 0;
  color: #6d7974;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.preview-shop-attribution div {
  display: flex;
  justify-content: center;
  gap: 6px 10px;
  flex-wrap: wrap;
}

.preview-shop-attribution a {
  color: #4b5f57;
}

@container (max-width: 900px) {
  .preview-pet-layout {
    grid-template-columns: minmax(220px, 0.84fr) minmax(0, 1.16fr);
  }

  .preview-owner-card {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 18px;
  }

  .preview-owner-card h3 {
    grid-column: 1 / -1;
  }
}

@container (max-width: 560px) {
  .preview-lost-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .preview-pet-layout,
  .preview-facts,
  .preview-owner-card {
    grid-template-columns: 1fr;
  }

  .preview-owner-card {
    display: block;
  }

}

.btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 8px;
  background: #e7efec;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.btn:hover {
  filter: brightness(0.98);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

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

.btn.dark {
  background: #172521;
  color: #fff;
}

.btn.icon-only {
  width: 38px;
  padding: 0;
}

.table-wrap {
  overflow: auto;
}

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

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

th {
  background: #f9fbfa;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

tr:hover td {
  background: #fbfdfc;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf3f1;
  color: #30423d;
  font-size: 12px;
  font-weight: 850;
}

.badge.good {
  background: #e4f5ea;
  color: #1f7a3d;
}

.badge.warn {
  background: #fff3df;
  color: #8a4c00;
}

.badge.bad {
  background: #ffe8ec;
  color: var(--rose);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.empty {
  padding: 34px 16px;
  color: var(--muted);
  text-align: center;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
}

.login-visual {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 52px;
  background:
    linear-gradient(135deg, rgba(20, 35, 31, 0.92), rgba(18, 113, 95, 0.78)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .08) 0 12px, transparent 12px 24px);
  color: #fff;
}

.login-copy h1 {
  max-width: 740px;
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
}

.login-copy p {
  max-width: 620px;
  color: #d7e7e1;
  font-size: 18px;
  line-height: 1.5;
}

.login-side {
  display: grid;
  place-items: center;
  padding: 22px;
  background: #fff;
}

.login-box {
  width: 100%;
  padding: 22px;
  box-shadow: none;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(9, 17, 15, 0.52);
  animation: fade-in 180ms var(--ease-swift) both;
}

.modal {
  width: min(720px, 100%);
  max-height: min(780px, calc(100vh - 40px));
  overflow: auto;
  border-radius: 13px;
  background: #fff;
  box-shadow: var(--shadow);
  animation: modal-in 260ms var(--ease-standard) both;
}

.cropper-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(9, 17, 15, 0.66);
  animation: fade-in 180ms var(--ease-swift) both;
}

.cropper-modal {
  width: min(860px, 100%);
  max-height: min(820px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  box-shadow: var(--shadow);
  animation: modal-in 260ms var(--ease-standard) both;
}

.cropper-head,
.cropper-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.cropper-head h2 {
  margin: 0;
  font-size: 18px;
}

.cropper-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.cropper-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  flex-wrap: wrap;
}

.cropper-body {
  min-height: 260px;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 16px;
  background: #edf3f1;
}

.cropper-body canvas {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(20, 33, 30, 0.1);
  touch-action: none;
  cursor: move;
}

.toast {
  position: fixed;
  right: 22px;
  top: 92px;
  z-index: 40;
  max-width: min(420px, calc(100vw - 44px));
  padding: 12px 14px;
  border-radius: 8px;
  background: #172521;
  color: #fff;
  box-shadow: var(--shadow);
  animation: toast-in 280ms var(--ease-standard) both;
}

.toast.error {
  background: #74182a;
}

.loading {
  opacity: 0.66;
  pointer-events: none;
}

@keyframes surface-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes enter-left {
  from {
    opacity: 0;
    transform: translateX(-18px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 1100px) {
  .app-shell,
  .login-page {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    align-content: start;
    grid-template-columns: 1fr;
    overflow-x: hidden;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 6;
    width: 100%;
    height: auto;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    padding: 14px;
  }

  .nav {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav button {
    width: auto;
    min-width: 0;
    flex: 0 0 138px;
    justify-content: center;
    white-space: nowrap;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-footer {
    display: none;
  }

  .filters,
  .batch-head,
  .grid.two,
  .design-workspace {
    grid-template-columns: 1fr;
  }

  .design-preview-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  body {
    overflow-x: hidden;
  }

  .app-shell,
  .sidebar,
  .main,
  .topbar,
  .content,
  .panel,
  .panel-body,
  .grid,
  .field {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .brand-panel {
    gap: 6px;
  }

  .account-email {
    max-width: calc(100vw - 36px);
  }

  .nav button {
    min-width: 0;
    flex-basis: 122px;
    min-height: 40px;
    padding: 8px 10px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
    gap: 12px;
  }

  .content {
    padding: 14px;
    overflow-x: hidden;
  }

  .main,
  .content,
  .panel,
  .design-workspace {
    min-width: 0;
    max-width: 100%;
  }

  .input,
  .select {
    min-width: 0;
  }

  .input:disabled {
    overflow: hidden;
    text-overflow: ellipsis;
  }

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

  .toolbar {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    justify-content: stretch;
  }

  .toolbar .btn,
  .toolbar .input,
  .toolbar .select {
    width: 100%;
    min-width: 0;
  }

  .toolbar .btn.icon-only {
    width: 42px;
    justify-self: start;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-body {
    padding: 14px;
  }

  .table-wrap {
    width: 100%;
    margin: 0;
    overflow-x: auto;
  }

  table,
  .batch-table {
    min-width: 680px;
  }

  .login-visual {
    padding: 28px;
    min-height: 420px;
  }

  .preview-pet-layout,
  .preview-facts {
    grid-template-columns: 1fr;
  }

  .preview-lost-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .batch-actions {
    width: 100%;
  }

  .batch-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .batch-actions .btn {
    flex: 1 1 auto;
  }

  .batch-actions .btn.icon-only {
    flex: 0 0 42px;
  }
}
