:root {
  color-scheme: light;
  --bg: #f7f7f5;
  --bg-top: #f1f0eb;
  --bg-orb: rgba(201, 176, 136, 0.28);
  --bg-orb-alt: rgba(55, 53, 47, 0.08);
  --surface: rgba(255, 255, 255, 0.68);
  --surface-soft: rgba(255, 255, 255, 0.52);
  --surface-muted: rgba(241, 241, 239, 0.58);
  --surface-strong: rgba(247, 246, 243, 0.5);
  --surface-glow: rgba(255, 255, 255, 0.55);
  --border: rgba(55, 53, 47, 0.04);
  --border-strong: rgba(55, 53, 47, 0.08);
  --text: #37352f;
  --muted: #787774;
  --muted-soft: #9b9993;
  --heading: #191919;
  --accent: #2f3437;
  --accent-contrast: #ffffff;
  --success: #7faa00;
  --success-bg: rgba(152, 205, 0, 0.14);
  --order-green: #98cd00;
  --order-green-hover: #86b700;
  --order-green-text: #1b1f10;
  --danger: #ce2626;
  --danger-bg: rgba(206, 38, 38, 0.14);
  --warning: #a05f04;
  --warning-bg: rgba(217, 119, 6, 0.14);
  --info: #0f766e;
  --info-bg: rgba(15, 118, 110, 0.12);
  --hero-orb: rgba(201, 176, 136, 0.36);
  --visual-card: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 244, 239, 0.96));
  --visual-card-alt: linear-gradient(180deg, rgba(252, 251, 249, 0.98), rgba(244, 241, 236, 0.95));
  --table-head: rgba(251, 251, 250, 0.96);
  --row-hover: rgba(55, 53, 47, 0.03);
  --input-bg: rgba(255, 255, 255, 0.98);
  --focus-ring: rgba(55, 53, 47, 0.1);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 20px 44px rgba(15, 23, 42, 0.045);
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font-body: "Instrument Sans", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171717;
  --bg-top: #101010;
  --bg-orb: rgba(255, 255, 255, 0.08);
  --bg-orb-alt: rgba(171, 171, 167, 0.06);
  --surface: rgba(31, 31, 31, 0.72);
  --surface-soft: rgba(32, 32, 32, 0.54);
  --surface-muted: rgba(42, 42, 42, 0.58);
  --surface-strong: rgba(37, 37, 37, 0.52);
  --surface-glow: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.045);
  --border-strong: rgba(255, 255, 255, 0.09);
  --text: #e8e8e6;
  --muted: #a3a29d;
  --muted-soft: #7f7e79;
  --heading: #ffffff;
  --accent: #f1f1ee;
  --accent-contrast: #171717;
  --success: #8fbe00;
  --success-bg: rgba(152, 205, 0, 0.18);
  --order-green: #98cd00;
  --order-green-hover: #86b700;
  --order-green-text: #1b1f10;
  --danger: #ce2626;
  --danger-bg: rgba(206, 38, 38, 0.2);
  --warning: #f0b35a;
  --warning-bg: rgba(240, 179, 90, 0.16);
  --info: #72d7cf;
  --info-bg: rgba(114, 215, 207, 0.16);
  --hero-orb: rgba(255, 255, 255, 0.08);
  --visual-card: linear-gradient(180deg, rgba(45, 45, 45, 0.98), rgba(28, 28, 28, 0.96));
  --visual-card-alt: linear-gradient(180deg, rgba(39, 39, 39, 0.98), rgba(24, 24, 24, 0.95));
  --table-head: rgba(34, 34, 34, 0.98);
  --row-hover: rgba(255, 255, 255, 0.04);
  --input-bg: rgba(33, 33, 33, 0.98);
  --focus-ring: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.16);
  --shadow-md: 0 20px 44px rgba(0, 0, 0, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at top left, var(--bg-orb), transparent 26%),
    radial-gradient(circle at top right, var(--bg-orb-alt), transparent 28%),
    linear-gradient(180deg, var(--bg-top), var(--bg));
  transition: background-color 0.25s ease, color 0.25s ease;
}

body.app-loading {
  overflow: hidden;
}

.app-loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, var(--surface) 0%, rgba(255, 255, 255, 0) 62%),
    linear-gradient(180deg, var(--bg-top), var(--bg));
  opacity: 1;
  visibility: visible;
  transition: opacity 0.28s var(--ease-standard), visibility 0.28s var(--ease-standard);
}

.app-loader__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.app-loader.is-leaving {
  opacity: 0;
  visibility: hidden;
}

.app-loader__image {
  display: block;
  width: clamp(156px, 27vw, 246px);
  height: clamp(156px, 27vw, 246px);
  object-fit: contain;
}

.app-loader__text {
  margin: 0;
  min-height: 24px;
  color: var(--heading);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-loader__dots {
  display: inline-block;
  width: 4ch;
  text-align: left;
  vertical-align: bottom;
}

.app-loader__dots::before {
  content: "....";
  display: inline-block;
  overflow: hidden;
  width: 0;
  animation: loaderDots 1.2s steps(4, end) infinite;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.16em 0.4em;
}

button,
input,
a,
.panel,
.hero,
.hero__visual-card,
.controls__visual-card,
.table-wrap,
.search-tag,
.stat-card,
thead th,
tbody tr,
.action-link {
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease;
}

.search-shell__icon,
.mobile-product-modal,
.mobile-product-modal__backdrop,
.mobile-product-modal__dialog,
.mobile-product-modal__close,
.action-link i,
.hero__image,
.controls__image,
.empty-state__spinner {
  transition:
    color 0.25s ease,
    opacity 0.22s var(--ease-standard),
    transform 0.28s var(--ease-out),
    background-color 0.25s ease;
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid transparent;
}

.site-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.theme-switch {
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--order-green), var(--order-green-hover));
  border: 1px solid var(--order-green-hover);
  color: var(--order-green-text);
  font: inherit;
  cursor: pointer;
  box-shadow: none;
}

.theme-switch__icon {
  font-size: 16px;
  line-height: 1;
  transition: color 0.25s ease, transform 0.28s var(--ease-out);
}

.theme-switch:hover {
  color: var(--order-green-text);
  border-color: var(--order-green-hover);
  background: linear-gradient(180deg, var(--order-green-hover), #739d00);
  transform: none;
}

.theme-switch:hover .theme-switch__icon {
  transform: rotate(-14deg) scale(1.08);
}

.theme-switch:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.theme-switch[data-theme="dark"] {
  color: var(--order-green-text);
}

.theme-switch[data-theme="light"] {
  color: var(--order-green-text);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: var(--surface);
  box-shadow: none;
}

.brand__logo-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
}

.brand__title {
  color: var(--heading);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand__subtitle {
  color: var(--muted);
  font-size: 0.81rem;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(260px, 0.84fr);
  align-items: center;
  gap: 28px;
  margin-bottom: 22px;
  padding: 32px;
  border: 1px solid transparent;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
  box-shadow: none;
  overflow: hidden;
}

.hero__content,
.hero__visual {
  position: relative;
  z-index: 1;
}

.hero__content {
  min-width: 0;
  max-width: 640px;
}

.hero__eyebrow,
.controls__eyebrow,
.search-tag,
.hero__meta-item {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.search-tag--value {
  background: var(--success-bg);
  color: var(--success);
}

.hero__title {
  margin: 16px 0 10px;
  max-width: 11ch;
  color: var(--heading);
  font-size: clamp(2.2rem, 4.2vw, 3.6rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero__desc {
  margin: 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero__meta-item {
  color: var(--text);
  border-radius: 12px;
}

.hero__stats {
  margin-top: 22px;
  max-width: 560px;
  overflow-x: auto;
}

.hero__visual {
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: 100%;
}

.hero__visual-card {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: min(100%, 340px);
  min-height: 100%;
  padding: 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.hero__image {
  display: block;
  width: min(100%, 290px);
  height: auto;
  object-fit: contain;
  transform-origin: center bottom;
  animation: figureFloatHero 6.4s ease-in-out infinite;
}

.dashboard {
  display: block;
  margin-top: 28px;
}

.panel {
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  box-shadow: none;
  backdrop-filter: blur(16px);
}

.controls {
  padding: 24px;
}

.controls__inner {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}

.controls__copy {
  min-width: 0;
}

.controls__eyebrow {
  margin-bottom: 12px;
}

.controls__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  background: transparent;
}

.controls__image {
  display: block;
  width: 100%;
  max-width: 190px;
  height: auto;
  object-fit: contain;
  transform-origin: center bottom;
  animation: figureFloatControls 7s ease-in-out infinite;
}

.hero__visual-card:hover .hero__image {
  transform: translateY(-8px) rotate(-2deg) scale(1.03);
}

.controls__visual:hover .controls__image {
  transform: translateY(-6px) rotate(2deg) scale(1.03);
}

.controls__title,
.table-title {
  margin: 0;
  color: var(--heading);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.controls__subtitle,
.table-subtitle,
.footer-note {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.94rem;
}

.search-shell {
  position: relative;
  margin-top: 18px;
}

.search-shell::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 10px;
  height: 2px;
  border-radius: 999px;
  background: var(--heading);
  opacity: 0;
  transform: scaleX(0.3);
  transform-origin: left center;
  transition: opacity 0.22s var(--ease-standard), transform 0.28s var(--ease-out);
}

.search-shell__icon {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 18px;
  height: 18px;
  color: var(--muted-soft);
  transform: translateY(-50%);
  pointer-events: none;
}

.search-shell__icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.search-shell.is-active::after,
.search-shell.has-value::after {
  opacity: 0.9;
  transform: scaleX(1);
}

.search-shell.is-active .search-shell__icon,
.search-shell.has-value .search-shell__icon {
  color: var(--heading);
  transform: translateY(-50%) scale(1.08);
}

.input,
.action-button {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid transparent;
  font: inherit;
}

.input {
  padding: 0 15px;
  color: var(--text);
  background: var(--input-bg);
  box-shadow: none;
}

.input--search {
  min-height: 62px;
  padding-left: 48px;
  padding-right: 18px;
  border-radius: 18px;
}

.search-shell.is-active .input--search,
.search-shell.has-value .input--search {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.action-button {
  padding: 0 16px;
  cursor: pointer;
  font-weight: 600;
  color: var(--accent-contrast);
  background: var(--accent);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.18);
}

.input:focus,
.action-button:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.input::placeholder {
  color: var(--muted-soft);
}

.search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.action-button:hover,
.action-link:hover {
  transform: translateY(-1px);
}

.action-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.empty-state__spinner {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center;
  animation: loaderSpin 1s linear infinite;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-width: 360px;
}

.stat-card {
  position: relative;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  box-shadow: var(--shadow-sm);
}

.stat-card:hover {
  border-color: var(--border-strong);
  background: var(--surface);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card__label {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 8px;
}

.stat-card__value {
  display: block;
  color: var(--heading);
  font-size: clamp(1.14rem, 2.4vw, 1.52rem);
  letter-spacing: -0.05em;
  transition: transform 0.28s var(--ease-out), opacity 0.22s var(--ease-standard);
}

.stat-card:hover .stat-card__value {
  transform: translateY(-1px);
}

.table-panel {
  margin-top: 24px;
  padding: 22px;
}

.table-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.table-wrap {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid transparent;
  background: var(--surface-soft);
}

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

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 14px 16px;
  text-align: left;
  color: var(--muted);
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--table-head);
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 16px;
  vertical-align: top;
  font-size: 0.94rem;
  border-bottom: 1px solid var(--border);
}

tbody tr:hover {
  background: var(--row-hover);
}

.product-row > td {
  opacity: 0;
  transform: translateY(14px);
  animation: productRowIn 0.44s var(--ease-out) forwards;
  animation-delay: var(--row-delay, 0ms);
}

.product-name {
  display: block;
  color: var(--heading);
  font-weight: 600;
  margin-bottom: 6px;
}

.product-meta {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge--number {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 999px;
}

.badge--success {
  background: var(--success-bg);
  color: var(--success);
}

.badge--danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--order-green);
  background: var(--order-green);
  color: var(--order-green-text);
  text-decoration: none;
}

.action-link:hover {
  background: var(--order-green-hover);
  border-color: var(--order-green-hover);
}

.action-link:hover i {
  transform: translateX(1px) scale(1.04);
}

.action-link i {
  width: 20px;
  height: 20px;
  font-size: 18px;
  line-height: 1;
}

.action-link--disabled {
  background: var(--danger-bg);
  border-color: transparent;
  color: var(--danger);
  pointer-events: none;
}

.empty-state {
  padding: 30px 20px;
  text-align: center;
  color: var(--muted);
  line-height: 1.7;
}

.empty-state__loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.empty-state__spinner {
  width: 84px;
  height: 84px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.pagination__pages {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.pagination__button {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.pagination__button:hover:not(:disabled) {
  background: var(--surface);
  border-color: var(--border-strong);
}

.pagination__button.is-active {
  background: var(--order-green);
  border-color: var(--order-green);
  color: var(--order-green-text);
}

.pagination__button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pagination__button.is-active:disabled {
  opacity: 1;
  cursor: default;
}

.pagination__button--nav {
  width: 38px;
  min-width: 38px;
  padding: 0;
}

.pagination__button--nav i {
  font-size: 14px;
  line-height: 1;
}

.mobile-product-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
}

.mobile-product-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-product-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 23, 23, 0.52);
  backdrop-filter: blur(4px);
  opacity: 0;
}

.mobile-product-modal__dialog {
  position: absolute;
  left: 50%;
  bottom: 16px;
  width: min(calc(100% - 24px), 420px);
  opacity: 0;
  transform: translateX(-50%) translateY(28px) scale(0.97);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.mobile-product-modal.is-open .mobile-product-modal__backdrop {
  opacity: 1;
}

.mobile-product-modal.is-open .mobile-product-modal__dialog {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.mobile-product-modal__content {
  padding: 20px 18px 18px;
}

.mobile-product-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--heading);
  font: inherit;
  cursor: pointer;
}

.mobile-product-modal__close:hover {
  transform: rotate(90deg);
}

.mobile-product-modal__title {
  margin: 14px 0 0;
  color: var(--heading);
  font-size: 1.16rem;
  line-height: 1.35;
  letter-spacing: -0.03em;
}

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

.mobile-product-modal__item {
  margin-top: 16px;
}

.mobile-product-modal__meta .mobile-product-modal__item {
  margin-top: 0;
  padding: 12px;
  border-radius: 16px;
  background: var(--surface-strong);
}

.mobile-product-modal__label {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mobile-product-modal__value {
  color: var(--heading);
  font-size: 1rem;
}

.mobile-product-modal__notes {
  margin: 0;
  color: var(--text);
  line-height: 1.7;
}

.mobile-product-modal__order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  margin-top: 18px;
  border-radius: 14px;
  background: var(--order-green);
  color: var(--order-green-text);
  text-decoration: none;
  font-weight: 700;
}

body.modal-open {
  overflow: hidden;
}

.footer-note {
  text-align: right;
}

.motion-ready .fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.65s var(--ease-out),
    transform 0.65s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

.motion-ready .fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes productRowIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

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

@keyframes figureFloatHero {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-1deg);
  }

  50% {
    transform: translate3d(0, -14px, 0) rotate(1.4deg);
  }
}

@keyframes figureFloatControls {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(1deg);
  }

  50% {
    transform: translate3d(0, -10px, 0) rotate(-1.3deg);
  }
}

@keyframes loaderSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes loaderDots {
  from {
    width: 0;
  }

  to {
    width: 4ch;
  }
}

@media (max-width: 900px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-header__actions {
    width: 100%;
    justify-content: flex-end;
  }

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

  .hero__title {
    max-width: none;
  }

  .hero__visual {
    min-height: 0;
  }

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

  .controls__visual {
    order: -1;
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .page {
    width: min(100% - 20px, 1120px);
    padding-top: 12px;
  }

  .site-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 6px;
  }

  .brand__text {
    display: none;
  }

  .site-header__actions {
    width: auto;
    gap: 10px;
  }

  .theme-switch {
    margin-left: 0;
  }

  .hero {
    margin-bottom: 12px;
    padding: 22px 18px;
  }

  .hero__visual {
    display: none;
  }

  .controls,
  .table-panel {
    padding: 18px;
  }

  .controls__copy {
    text-align: center;
  }

  .controls__visual {
    justify-content: center;
  }

  .search-shell {
    max-width: 100%;
  }

  .search-tags {
    justify-content: center;
  }

  .controls__image {
    max-width: 180px;
  }

  .table-wrap {
    overflow-x: hidden;
  }

  table {
    min-width: 0;
    table-layout: fixed;
  }

  .product-row--mobile {
    cursor: pointer;
  }

  .product-row--mobile:active {
    background: var(--row-hover);
  }

  thead th:nth-child(n + 4),
  tbody td:nth-child(n + 4) {
    display: none;
  }

  thead th,
  tbody td {
    padding: 12px 10px;
  }

  thead th:nth-child(1),
  tbody td:nth-child(1) {
    width: 52px;
    text-align: center;
  }

  thead th:nth-child(3),
  tbody td:nth-child(3) {
    width: 110px;
  }

  .product-name {
    margin-bottom: 0;
    font-size: 0.92rem;
    line-height: 1.45;
  }
}

@media (min-width: 721px) {
  .mobile-product-modal {
    display: none;
  }
}

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

  .motion-ready .fade-in,
  .motion-ready .fade-in.is-visible,
  .app-loader,
  .app-loader__image,
  .app-loader__dots::before,
  .product-row > td,
  .mobile-product-modal,
  .mobile-product-modal__backdrop,
  .mobile-product-modal__dialog,
  .hero__image,
  .controls__image,
  .empty-state__spinner {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }
}

@media (max-width: 560px) {
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
  }

  .stat-card {
    padding: 12px 10px;
    border-radius: 14px;
    box-shadow: none;
    transform: none;
  }

  .stat-card:hover {
    background: var(--surface-strong);
    border-color: var(--border);
    transform: none;
    box-shadow: none;
  }

  .stat-card:hover .stat-card__value {
    transform: none;
  }

  .stat-card__label {
    margin-bottom: 6px;
    font-size: 0.7rem;
    line-height: 1.35;
  }

  .stat-card__value {
    font-size: clamp(0.95rem, 3.8vw, 1.14rem);
  }

  .table-panel {
    padding: 16px;
  }
}
