:root {
  --navy-950: #091421;
  --navy-900: #132238;
  --navy-800: #1b304d;
  --navy-700: #2a4364;
  --blue-700: #1649c9;
  --blue-600: #245fe5;
  --blue-100: #e8efff;
  --teal-700: #087966;
  --teal-100: #def7f0;
  --amber-700: #a54f0b;
  --amber-100: #fff1d6;
  --red-700: #b4233b;
  --red-100: #fde8ec;
  --slate-900: #172033;
  --slate-700: #465369;
  --slate-600: #647087;
  --slate-500: #8190a5;
  --slate-300: #cbd4e0;
  --slate-200: #e2e8f0;
  --slate-150: #edf1f6;
  --slate-100: #f4f7fa;
  --white: #fff;
  --surface: #f6f8fb;
  --shadow-sm: 0 1px 2px rgb(17 34 56 / 5%);
  --shadow-md: 0 12px 32px rgb(17 34 56 / 9%);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --sidebar-width: 264px;
  --topbar-height: 68px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--slate-900);
  background: var(--surface);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgb(36 95 229 / 32%);
  outline-offset: 2px;
}

button:disabled,
fieldset:disabled {
  cursor: not-allowed;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--navy-900);
  letter-spacing: -0.025em;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(1.85rem, 3vw, 2.45rem);
  line-height: 1.12;
}

h2 {
  margin-bottom: 4px;
  font-size: 1.15rem;
  line-height: 1.25;
}

h3 {
  margin-bottom: 4px;
  font-size: 1rem;
}

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: var(--white);
  background: var(--blue-700);
  border-radius: var(--radius-sm);
  transform: translateY(-160%);
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  vertical-align: middle;
}

.icon--small {
  width: 15px;
  height: 15px;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--blue-700);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.105em;
  text-transform: uppercase;
}

.eyebrow--inverse {
  color: #89afff;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--navy-900);
  text-decoration: none;
}

.brand__mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-600), #5790ff);
  border-radius: 11px;
  box-shadow: 0 6px 14px rgb(36 95 229 / 25%);
  font-size: 1.12rem;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.brand__copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand__copy strong {
  font-size: 1.08rem;
  letter-spacing: 0.08em;
}

.brand__copy small {
  margin-top: 5px;
  color: var(--slate-500);
  font-size: 0.67rem;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.brand--inverse,
.brand--inverse .brand__copy small {
  color: var(--white);
}

.brand--inverse .brand__mark {
  color: var(--navy-900);
  background: var(--white);
  box-shadow: 0 8px 24px rgb(0 0 0 / 18%);
}

.button,
.icon-button,
.input-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.button {
  min-height: 42px;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.button:not(:disabled):active {
  transform: translateY(1px);
}

.button--primary {
  color: var(--white);
  background: var(--blue-600);
  box-shadow: 0 5px 12px rgb(36 95 229 / 18%);
}

.button--primary:not(:disabled):hover {
  background: var(--blue-700);
}

.button--secondary {
  color: var(--navy-900);
  background: var(--white);
  border-color: var(--slate-300);
  box-shadow: var(--shadow-sm);
}

.button--secondary:not(:disabled):hover,
.button--ghost:not(:disabled):hover {
  color: var(--blue-700);
  border-color: #9ab5ed;
  background: #f7f9ff;
}

.button--ghost {
  color: var(--slate-700);
  background: transparent;
  border-color: var(--slate-200);
}

.button--danger {
  color: var(--white);
  background: var(--red-700);
  border-color: var(--red-700);
}

.button--danger:not(:disabled):hover {
  background: #991b1b;
  border-color: #991b1b;
}

.button--wide {
  width: 100%;
}

.button:disabled {
  color: var(--slate-500);
  background: var(--slate-150);
  border-color: var(--slate-200);
  box-shadow: none;
  opacity: 0.8;
}

.icon-button,
.input-action {
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--slate-600);
  background: transparent;
  border-radius: 10px;
}

.icon-button:not(:disabled):hover,
.input-action:not(:disabled):hover {
  color: var(--blue-700);
  background: var(--slate-100);
}

.icon-button--compact {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

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

.sidebar {
  position: fixed;
  z-index: 50;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  color: #dbe5f4;
  background:
    radial-gradient(circle at 5% 0%, rgb(56 99 164 / 30%), transparent 34%),
    var(--navy-950);
  border-right: 1px solid rgb(255 255 255 / 6%);
}

.sidebar__brand {
  display: flex;
  min-height: var(--topbar-height);
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid rgb(255 255 255 / 8%);
}

.sidebar .brand,
.sidebar .brand__copy small {
  color: var(--white);
}

.sidebar__close {
  display: none;
  color: #c7d4e6;
}

.sidebar__nav {
  flex: 1;
  padding: 17px 13px 24px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgb(255 255 255 / 15%) transparent;
}

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

.nav-group__label {
  margin: 0 12px 7px;
  color: #7588a2;
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list li + li {
  margin-top: 3px;
}

.nav-link {
  position: relative;
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  color: #b8c6d9;
  border-radius: 9px;
  font-size: 0.89rem;
  font-weight: 620;
  text-decoration: none;
}

.nav-link::before {
  position: absolute;
  inset: 9px auto 9px -13px;
  width: 3px;
  content: "";
  background: #72a0ff;
  border-radius: 0 4px 4px 0;
  opacity: 0;
}

.nav-link:hover {
  color: var(--white);
  background: rgb(255 255 255 / 6%);
}

.nav-link.is-active {
  color: var(--white);
  background: linear-gradient(90deg, rgb(52 104 204 / 32%), rgb(52 104 204 / 14%));
}

.nav-link.is-active::before {
  opacity: 1;
}

.sidebar__footer {
  padding: 16px 20px 20px;
  border-top: 1px solid rgb(255 255 255 / 8%);
}

.sidebar__footer p {
  margin: 8px 0 0;
  color: #6f829d;
  font-size: 0.68rem;
}

.environment-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #aec0d5;
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: capitalize;
}

.environment-pill__dot {
  width: 7px;
  height: 7px;
  background: #39d2a1;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgb(57 210 161 / 12%);
}

.workspace {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  height: var(--topbar-height);
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  background: rgb(255 255 255 / 92%);
  border-bottom: 1px solid var(--slate-200);
  backdrop-filter: blur(14px);
}

.topbar__start,
.topbar__actions,
.topbar__context {
  display: flex;
  align-items: center;
}

.topbar__start {
  min-width: 0;
  gap: 10px;
}

.topbar__context {
  gap: 7px;
  color: var(--slate-500);
  font-size: 0.82rem;
  white-space: nowrap;
}

.topbar__context strong {
  max-width: 320px;
  color: var(--slate-700);
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__menu {
  display: none;
}

.topbar__actions {
  gap: 7px;
}

.account-chip {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 9px;
  padding: 5px 8px;
  border-radius: 11px;
  text-decoration: none;
}

.account-chip:hover,
.account-chip.is-active {
  background: var(--slate-100);
}

.account-chip__avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--blue-700);
  background: var(--blue-100);
  border-radius: 9px;
  font-size: 0.72rem;
  font-weight: 800;
}

.account-chip__copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.account-chip__copy strong {
  font-size: 0.77rem;
}

.account-chip__copy small {
  margin-top: 3px;
  color: var(--slate-500);
  font-size: 0.65rem;
}

.preview-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 30px;
  color: #294365;
  background: #eaf2ff;
  border-bottom: 1px solid #d6e5ff;
  font-size: 0.78rem;
}

.product-results {
  overflow: hidden;
}

.product-list {
  display: grid;
  gap: 10px;
  padding: 0 18px 20px;
}

.product-result {
  display: grid;
  grid-template-columns: 88px minmax(240px, 2fr) minmax(170px, 1.1fr) minmax(125px, 0.8fr) minmax(145px, 0.9fr) minmax(120px, 0.7fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--slate-200);
  border-radius: 13px;
  background: var(--white);
  box-shadow: 0 1px 2px rgb(15 23 42 / 4%);
}

.product-result:hover {
  border-color: #bfd2f5;
  box-shadow: 0 5px 18px rgb(30 64 175 / 7%);
}

.product-result__cover {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  background: var(--slate-100);
}

.product-result__cover-button,
.product-result__cover img {
  display: block;
  width: 100%;
  height: 100%;
}

.product-result__cover-button {
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.product-result__cover-button:focus-visible {
  outline: 3px solid rgb(37 99 235 / 35%);
  outline-offset: -3px;
}

.product-result__cover-button:hover img {
  transform: scale(1.04);
}

.product-result__cover img {
  object-fit: contain;
  background: var(--white);
  transition: transform 160ms ease;
}

.product-result__cover-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--slate-500);
  background: linear-gradient(145deg, var(--slate-100), #e8eef8);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.product-result__main,
.product-result__facts {
  min-width: 0;
}

.product-result__title-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.product-result__main h3 {
  margin: 0;
  color: var(--navy-900);
  font-size: 0.93rem;
  line-height: 1.35;
}

.product-result__main p {
  margin: 5px 0 0;
  color: var(--slate-500);
  font-size: 0.75rem;
}

.product-result__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.product-result__tags span {
  padding: 3px 7px;
  color: #405574;
  background: var(--slate-100);
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
}

.product-result__facts {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  color: var(--slate-500);
  font-size: 0.69rem;
  line-height: 1.35;
}

.product-result__facts strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--navy-900);
  font-size: 0.79rem;
}

.product-result__label {
  color: var(--slate-500);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.product-result__details {
  grid-column: 1 / -1;
  border-top: 1px solid var(--slate-200);
}

.product-result__details > summary {
  width: fit-content;
  margin: 9px 0 -5px auto;
  padding: 5px 2px;
  color: var(--blue-700);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  list-style-position: inside;
}

.product-detail {
  display: grid;
  gap: 20px;
  padding: 16px 0 4px;
}

.product-detail section h4 {
  margin: 0 0 9px;
  color: var(--navy-900);
  font-size: 0.8rem;
}

.product-attributes {
  display: grid;
  grid-template-columns: repeat(4, minmax(135px, 1fr));
  gap: 8px;
  margin: 0;
}

.product-attributes div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  background: var(--slate-100);
}

.product-attributes dt {
  color: var(--slate-500);
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.product-attributes dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  color: var(--navy-900);
  font-size: 0.75rem;
  font-weight: 650;
}

.source-payload {
  padding-top: 12px;
  border-top: 1px solid var(--slate-200);
}

.image-preview {
  width: min(860px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--slate-200);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 24px 70px rgb(15 23 42 / 35%);
}

.image-preview::backdrop {
  background: rgb(15 23 42 / 72%);
  backdrop-filter: blur(3px);
}

.image-preview__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--slate-200);
}

.image-preview__header h2 {
  margin: 3px 0 0;
  color: var(--navy-900);
  font-size: 1rem;
}

.image-preview__close {
  display: grid;
  width: 36px;
  height: 36px;
  flex: none;
  place-items: center;
  padding: 0;
  border: 1px solid var(--slate-200);
  border-radius: 9px;
  color: var(--navy-900);
  background: var(--white);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.image-preview__canvas {
  display: grid;
  min-height: 420px;
  max-height: calc(100vh - 130px);
  place-items: center;
  padding: 24px;
  overflow: auto;
  background: #f4f7fb;
}

.image-preview__canvas img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 180px);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgb(15 23 42 / 14%);
}

.catalog-preview {
  margin-top: 20px;
}

.catalog-activation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 18px 20px;
}

.catalog-activation__steps {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
}

.catalog-activation__steps > div {
  display: grid;
  grid-template-columns: 30px 1fr;
  column-gap: 9px;
  align-items: center;
  min-height: 54px;
  padding: 9px 11px;
  color: var(--slate-500);
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: 10px;
}

.catalog-activation__steps span {
  display: grid;
  width: 30px;
  height: 30px;
  grid-row: 1 / span 2;
  place-items: center;
  color: var(--slate-600);
  background: var(--white);
  border-radius: 50%;
  font-size: 0.73rem;
  font-weight: 800;
}

.catalog-activation__steps strong {
  color: var(--navy-900);
  font-size: 0.76rem;
}

.catalog-activation__steps small {
  font-size: 0.64rem;
}

.catalog-activation__steps > .is-complete {
  color: #17775f;
  background: var(--teal-100);
  border-color: #b9e7da;
}

.catalog-activation__steps > .is-complete span {
  color: var(--white);
  background: #238c70;
}

.catalog-activation__actions {
  display: flex;
  flex: none;
  gap: 9px;
}

.catalog-builder {
  margin-top: 20px;
}

.catalog-filter-builder__sentence {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(180px, 1.15fr) minmax(150px, 1fr) minmax(220px, 1.5fr) auto;
  gap: 12px;
  align-items: end;
}

.catalog-filter-builder__sentence .field {
  margin: 0;
}

.catalog-filter-builder__sentence .button {
  min-height: 42px;
}

.catalog-filter-builder__advanced {
  margin-top: 14px;
}

.catalog-rule-list {
  display: grid;
  gap: 8px;
  padding: 0 22px 22px;
}

.catalog-rule {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px 14px;
  background: #fafbfd;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
}

.catalog-rule strong,
.catalog-rule small {
  display: block;
}

.catalog-rule strong {
  color: var(--navy-900);
  font-size: 0.79rem;
}

.catalog-rule small {
  margin-top: 4px;
  color: var(--slate-600);
  font-size: 0.67rem;
}

.data-table td > strong,
.data-table td > small {
  display: block;
}

.data-table td > small {
  margin-top: 4px;
  color: var(--slate-500);
  font-size: 0.66rem;
}

.workflow-section-heading {
  margin: 28px 2px 12px;
}

.workflow-section-heading h2,
.workflow-section-heading p {
  margin: 0;
}

.workflow-section-heading > p:last-child {
  margin-top: 5px;
  color: var(--slate-600);
  font-size: 0.8rem;
}

.catalog-preview__count {
  display: grid;
  text-align: right;
}

.catalog-preview__count strong {
  color: var(--navy-900);
  font-size: 1.55rem;
}

.catalog-preview__count span {
  color: var(--slate-500);
  font-size: 0.66rem;
}

.catalog-preview__body {
  overflow: hidden;
}

.catalog-preview__empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
}

.catalog-preview__empty h3,
.catalog-preview__empty p {
  margin: 0;
}

.catalog-preview__empty p {
  margin-top: 5px;
  color: var(--slate-600);
  font-size: 0.76rem;
}

.catalog-preview__summary {
  margin: 0;
  padding: 12px 18px;
  color: var(--slate-600);
  background: var(--blue-100);
  border-bottom: 1px solid var(--slate-200);
  font-size: 0.76rem;
}

.catalog-preview__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px 16px;
}

.catalog-preview__tabs .button span {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgb(15 23 42 / 7%);
  font-size: 0.7rem;
}

.catalog-preview__tabs .button--primary span {
  background: rgb(255 255 255 / 18%);
}

.catalog-preview__pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px 18px;
  color: var(--slate-600);
  border-top: 1px solid var(--slate-200);
  font-size: 0.75rem;
}

.catalog-preview__pagination > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.catalog-preview__pagination .button {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 0.75rem;
}

.catalog-preview__table-scroll {
  max-height: 620px;
  overflow: auto;
}

.catalog-preview__table-scroll .data-table {
  min-width: 1180px;
}

.catalog-preview__table-scroll .data-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

@media (max-width: 1180px) {
  .catalog-activation {
    align-items: stretch;
    flex-direction: column;
  }

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

@media (max-width: 720px) {
  .catalog-activation__steps,
  .catalog-filter-builder__sentence {
    grid-template-columns: 1fr;
  }

  .catalog-activation__actions,
  .catalog-preview__empty,
  .catalog-preview__pagination {
    align-items: stretch;
    flex-direction: column;
  }
}

.source-payload > summary {
  color: var(--slate-600);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
}

.source-payload > p {
  color: var(--slate-500);
  font-size: 0.68rem;
}

.source-payload pre {
  max-width: calc(100vw - 370px);
  max-height: 320px;
  overflow: auto;
  padding: 14px;
  border-radius: 9px;
  color: #dbeafe;
  background: #111827;
}

@media (max-width: 1500px) {
  .product-result {
    grid-template-columns: 78px minmax(230px, 2fr) minmax(160px, 1fr) minmax(125px, 0.8fr);
  }

  .product-result__cover {
    width: 78px;
    height: 78px;
  }

  .product-result__cover {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .product-result__main {
    grid-column: 2;
    grid-row: 1;
  }

  .product-result__facts--identifiers {
    grid-column: 3;
    grid-row: 1;
  }

  .product-result__facts--commercial {
    grid-column: 4;
    grid-row: 1;
  }

  .product-result__facts--availability {
    grid-column: 2;
    grid-row: 2;
  }

  .product-result__facts--freshness {
    grid-column: 3 / span 2;
    grid-row: 2;
  }

  .product-attributes {
    grid-template-columns: repeat(3, minmax(135px, 1fr));
  }
}

@media (max-width: 820px) {
  .image-preview__header {
    padding: 12px 14px;
  }

  .image-preview__canvas {
    min-height: 280px;
    padding: 12px;
  }

  .product-list {
    padding: 0 10px 14px;
  }

  .product-result {
    grid-template-columns: 72px 1fr 1fr;
    gap: 12px;
  }

  .product-result__cover {
    width: 72px;
    height: 72px;
  }

  .product-result__main {
    grid-column: 2 / -1;
    grid-row: auto;
  }

  .product-result__cover,
  .product-result__facts--identifiers,
  .product-result__facts--commercial,
  .product-result__facts--availability,
  .product-result__facts--freshness {
    grid-column: auto;
    grid-row: auto;
  }

  .product-attributes {
    grid-template-columns: 1fr 1fr;
  }

  .source-payload pre {
    max-width: calc(100vw - 80px);
  }
}

@media (max-width: 540px) {
  .product-result {
    grid-template-columns: 62px 1fr;
  }

  .product-result__cover {
    width: 62px;
    height: 62px;
  }

  .product-result__facts {
    grid-column: 1 / -1;
  }

  .product-attributes {
    grid-template-columns: 1fr;
  }
}

.preview-banner[hidden] {
  display: none;
}

.preview-banner > .icon {
  color: var(--blue-700);
}

.preview-banner > div {
  display: flex;
  min-width: 0;
  flex: 1;
  gap: 7px;
}

.preview-banner strong {
  white-space: nowrap;
}

.preview-banner span {
  color: #58708f;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main-content {
  width: min(100%, 1540px);
  min-height: calc(100vh - var(--topbar-height) - 100px);
  margin: 0 auto;
  padding: 30px clamp(20px, 3vw, 42px) 44px;
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(20px, 3vw, 42px);
  color: var(--slate-500);
  border-top: 1px solid var(--slate-200);
  font-size: 0.69rem;
}

.app-footer code {
  color: var(--slate-600);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.sidebar-backdrop {
  display: none;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 26px;
}

.page-header > div:first-child {
  max-width: 770px;
}

.page-header__description {
  margin: 0;
  color: var(--slate-600);
  font-size: 0.94rem;
}

.page-header__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
}

.service-health {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  font-size: 0.76rem;
  font-weight: 750;
  white-space: nowrap;
}

.service-health__dot {
  width: 9px;
  height: 9px;
  background: var(--slate-500);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgb(129 144 165 / 13%);
}

.service-health--checking {
  color: var(--slate-600);
  background: var(--slate-100);
}

.service-health--ok {
  color: var(--teal-700);
  background: var(--teal-100);
  border-color: #b9e9dc;
}

.service-health--ok .service-health__dot {
  background: #0ca789;
  box-shadow: 0 0 0 4px rgb(12 167 137 / 14%);
}

.service-health--ko {
  color: var(--red-700);
  background: var(--red-100);
  border-color: #f3c8d0;
}

.service-health--ko .service-health__dot {
  background: #d92d4c;
  box-shadow: 0 0 0 4px rgb(217 45 76 / 14%);
}

.page-header--detail {
  margin-top: 18px;
}

.detail-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-title-row .eyebrow {
  margin-bottom: 0;
}

.panel {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 21px 23px 18px;
  border-bottom: 1px solid var(--slate-150);
}

.panel__header p:not(.eyebrow) {
  margin: 6px 0 0;
  color: var(--slate-600);
  font-size: 0.82rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 19px;
}

.metric-card {
  position: relative;
  min-height: 145px;
  padding: 19px 20px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.metric-card::after {
  position: absolute;
  right: -22px;
  bottom: -32px;
  width: 90px;
  height: 90px;
  content: "";
  background: currentColor;
  border-radius: 50%;
  opacity: 0.045;
}

.metric-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--slate-600);
  font-size: 0.77rem;
  font-weight: 680;
}

.metric-card__signal {
  width: 8px;
  height: 8px;
  background: var(--slate-300);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--slate-100);
}

.metric-card > strong {
  display: block;
  margin-top: 11px;
  color: var(--navy-900);
  font-size: 2rem;
  line-height: 1;
}

.metric-card > p {
  margin: 10px 0 0;
  color: var(--slate-500);
  font-size: 0.72rem;
}

.metric-card--warning .metric-card__signal { background: #e99a34; box-shadow: 0 0 0 4px var(--amber-100); }
.metric-card--info .metric-card__signal { background: var(--blue-600); box-shadow: 0 0 0 4px var(--blue-100); }
.metric-card--success .metric-card__signal { background: #23a482; box-shadow: 0 0 0 4px var(--teal-100); }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.panel--span-2 { grid-column: span 2; }
.panel--span-3 { grid-column: span 3; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue-700);
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.text-link .icon {
  width: 16px;
  height: 16px;
  transition: transform 0.15s ease;
}

.text-link:hover .icon {
  transform: translateX(2px);
}

.workstream-list {
  padding: 4px 22px 14px;
}

.workstream-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 2px;
}

a.workstream-item {
  color: inherit;
  text-decoration: none;
}

a.workstream-item:hover {
  background: var(--slate-50);
}

a.workstream-item:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
}

.workstream-item + .workstream-item {
  border-top: 1px solid var(--slate-150);
}

.workstream-item__icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--blue-700);
  background: var(--blue-100);
  border-radius: 9px;
}

.workstream-item__icon .icon {
  width: 18px;
  height: 18px;
}

.workstream-item__copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.workstream-item__copy strong {
  font-size: 0.82rem;
}

.workstream-item__copy span {
  margin-top: 2px;
  color: var(--slate-500);
  font-size: 0.71rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-badge {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 750;
  white-space: nowrap;
}

.status-badge--neutral { color: var(--slate-600); background: var(--slate-100); }
.status-badge--info { color: var(--blue-700); background: var(--blue-100); }
.status-badge--success { color: var(--teal-700); background: var(--teal-100); }
.status-badge--warning { color: var(--amber-700); background: var(--amber-100); }
.status-badge--danger { color: var(--red-700); background: var(--red-100); }

.priority-list {
  margin: 0;
  padding: 6px 22px 9px;
  list-style: none;
}

.priority-list li {
  display: flex;
  gap: 12px;
  padding: 13px 0;
}

.priority-list li + li {
  border-top: 1px solid var(--slate-150);
}

.priority-list li > span {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--blue-700);
  background: var(--blue-100);
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 800;
}

.priority-list div {
  display: flex;
  flex-direction: column;
}

.priority-list strong {
  font-size: 0.79rem;
}

.priority-list small {
  margin-top: 3px;
  color: var(--slate-500);
  font-size: 0.69rem;
  line-height: 1.35;
}

.priority-list + .button {
  width: calc(100% - 44px);
  margin: 3px 22px 20px;
}

.empty-state {
  display: flex;
  min-height: 300px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 44px 24px;
  text-align: center;
}

.empty-state__icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 13px;
  place-items: center;
  color: var(--blue-700);
  background: var(--blue-100);
  border-radius: 15px;
}

.empty-state h3 {
  margin-bottom: 6px;
  font-size: 0.93rem;
}

.empty-state p {
  max-width: 480px;
  margin: 0;
  color: var(--slate-500);
  font-size: 0.77rem;
}

.empty-state__query {
  margin-top: 12px;
  color: var(--slate-600);
  font-size: 0.72rem;
  font-weight: 650;
}

.empty-state--compact {
  min-height: 130px;
  align-items: center;
  justify-content: flex-start;
  flex-direction: row;
  gap: 15px;
  padding: 24px;
  text-align: left;
}

.empty-state--compact .empty-state__icon {
  margin: 0;
  flex: 0 0 auto;
}

.empty-state--compact h3 {
  margin: 0 0 4px;
}

.data-panel {
  overflow: hidden;
}

.data-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--slate-150);
}

.search-field,
.toolbar-field,
.input-shell {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  background: var(--white);
  border: 1px solid var(--slate-300);
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-field:focus-within,
.toolbar-field:focus-within,
.input-shell:focus-within {
  border-color: #7197eb;
  box-shadow: 0 0 0 3px rgb(36 95 229 / 10%);
}

.search-field {
  min-width: 260px;
  flex: 1;
  padding: 0 12px;
}

.search-field > .icon,
.toolbar-field > .icon,
.input-shell > .icon {
  width: 18px;
  height: 18px;
  color: var(--slate-500);
}

.search-field input,
.toolbar-field select,
.input-shell input {
  width: 100%;
  height: 40px;
  min-width: 0;
  color: var(--slate-900);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 0.82rem;
}

.search-field input::placeholder,
.input-shell input::placeholder {
  color: var(--slate-500);
}

.toolbar-field {
  min-width: 195px;
  padding-left: 12px;
}

.toolbar-field select {
  padding-right: 10px;
  cursor: pointer;
}

.table-scroll {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.data-table th {
  height: 46px;
  padding: 10px 18px;
  color: var(--slate-600);
  background: #fafbfd;
  border-bottom: 1px solid var(--slate-200);
  font-size: 0.66rem;
  font-weight: 760;
  letter-spacing: 0.045em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--slate-150);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.audit-table {
  min-width: 1080px;
  table-layout: fixed;
}

.audit-table__date { width: 10%; }
.audit-table__actor { width: 12%; }
.audit-table__action { width: 14%; }
.audit-table__entity { width: 16%; }
.audit-table__correlation { width: 14%; }
.audit-table__detail { width: 34%; }

.audit-table td {
  vertical-align: top;
  overflow-wrap: anywhere;
}

.audit-table td > small {
  display: block;
  margin-top: 4px;
  color: var(--slate-500);
}

.audit-table td > code {
  color: var(--navy-900);
  white-space: normal;
}

.audit-table__error-row {
  background: #fffdfd;
}

.audit-error-card {
  padding: 13px;
  background: #fff7f7;
  border: 1px solid #f2cccc;
  border-radius: 10px;
}

.audit-error-card__heading {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.audit-error-card__heading strong {
  padding-top: 3px;
  color: var(--red-700);
  font-size: 0.76rem;
  line-height: 1.4;
}

.audit-error-card > p {
  margin: 9px 0 0;
  color: var(--slate-700);
  font-size: 0.72rem;
  line-height: 1.5;
}

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

.audit-diagnostic > div {
  min-width: 0;
  padding: 8px 9px;
  background: var(--white);
  border: 1px solid #eddede;
  border-radius: 8px;
}

.audit-diagnostic dt {
  color: var(--slate-500);
  font-size: 0.61rem;
  font-weight: 750;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.audit-diagnostic dd {
  margin: 3px 0 0;
  color: var(--navy-900);
  font-size: 0.7rem;
  line-height: 1.4;
}

.audit-diagnostic__value {
  grid-column: 1 / -1;
}

.audit-diagnostic__value dd {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-raw-details {
  margin-top: 9px;
}

.audit-raw-details > summary {
  color: var(--blue-700);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 700;
}

.audit-raw-details[open] > summary {
  margin-bottom: 9px;
}

.audit-raw-details > strong {
  display: block;
  margin: 9px 0 5px;
  color: var(--slate-600);
  font-size: 0.65rem;
}

.audit-raw-details pre {
  max-height: 300px;
  margin: 0;
  padding: 11px;
  overflow: auto;
  color: #d8e5f5;
  background: #162338;
  border-radius: 8px;
  font-size: 0.65rem;
  line-height: 1.5;
  overflow-wrap: normal;
  white-space: pre;
}

.data-table--compact .empty-state {
  min-height: 150px;
}

.data-panel__footer {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  color: var(--slate-500);
  border-top: 1px solid var(--slate-150);
  font-size: 0.72rem;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 9px;
}

.inline-notice {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 22px;
  padding: 13px 15px;
  color: #34506f;
  background: #f2f6fb;
  border: 1px solid #dce5ef;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
}

.inline-notice > .icon {
  color: var(--blue-700);
}

.inline-notice > div {
  display: flex;
  flex-direction: column;
}

.inline-notice strong {
  color: var(--navy-900);
  font-size: 0.78rem;
}

.inline-notice span {
  margin-top: 2px;
  color: var(--slate-600);
}

.inline-notice--info {
  color: var(--blue-700);
  background: #edf4ff;
  border-color: #d3e2ff;
}

.inline-notice--warning {
  color: var(--amber-700);
  background: #fff8e9;
  border-color: #f3dfb6;
}

.inline-notice--warning > .icon {
  color: var(--amber-700);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 2px 14px;
}

.section-heading__meta {
  color: var(--slate-500);
  font-size: 0.73rem;
}

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

.integration-card {
  display: flex;
  min-height: 238px;
  flex-direction: column;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.integration-card:hover {
  border-color: #bdcce0;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.integration-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.integration-logo {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  color: var(--navy-900);
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 850;
}

.integration-logo--sellrapido { color: #76520e; background: #fff4d3; border-color: #f1dfa9; }
.integration-logo--amazon { color: #182334; background: #fff2d4; border-color: #f0ddad; }
.integration-logo--emag { color: #bd1f35; background: #ffedf0; border-color: #f3cdd4; }
.integration-logo--temu { color: #b54b14; background: #fff0e7; border-color: #f2d2c1; }
.integration-logo--ibs { color: #9c1835; background: #fceaf0; border-color: #efcad5; }
.integration-logo--space { color: #1b579c; background: #e8f2ff; border-color: #c9def7; }
.integration-logo--gls { color: #8f5e00; background: #fff7d9; border-color: #f2e2a7; }
.integration-logo--brt { color: #a71920; background: #fff0f0; border-color: #efc8ca; }

.integration-card__copy {
  margin-top: 18px;
}

.integration-card__copy h3 {
  margin-bottom: 3px;
  font-size: 1rem;
}

.integration-card__copy p {
  margin: 0;
  color: var(--slate-500);
  font-size: 0.72rem;
}

.integration-card__meta {
  flex: 1;
  padding: 15px 0;
}

.integration-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--slate-600);
  font-size: 0.7rem;
}

.integration-card__meta .icon {
  width: 16px;
  height: 16px;
}

.discovery-panel {
  margin-top: 20px;
}

.gate-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 22px;
  list-style: none;
}

.gate-grid li {
  position: relative;
  display: flex;
  min-height: 120px;
  flex-direction: column;
  padding: 8px 21px;
}

.gate-grid li + li {
  border-left: 1px solid var(--slate-200);
}

.gate-grid li > span {
  color: var(--blue-700);
  font-size: 0.66rem;
  font-weight: 800;
}

.gate-grid strong {
  margin-top: 9px;
  font-size: 0.8rem;
}

.gate-grid small {
  margin-top: 5px;
  color: var(--slate-500);
  font-size: 0.68rem;
  line-height: 1.45;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
  margin-bottom: 18px;
}

.settings-card .panel__header {
  min-height: 112px;
}

.settings-list {
  margin: 0;
  padding: 4px 23px 14px;
}

.settings-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}

.settings-list > div + div {
  border-top: 1px solid var(--slate-150);
}

.settings-list dt {
  color: var(--slate-600);
  font-size: 0.76rem;
}

.settings-list dd {
  margin: 0;
  color: var(--navy-900);
  font-size: 0.77rem;
  font-weight: 680;
  text-align: right;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--slate-600);
  font-size: 0.76rem;
  font-weight: 650;
  text-decoration: none;
}

.back-link:hover {
  color: var(--blue-700);
}

.back-link .icon {
  width: 17px;
  height: 17px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.summary-grid article {
  display: flex;
  min-height: 112px;
  flex-direction: column;
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
}

.summary-grid span {
  color: var(--slate-500);
  font-size: 0.68rem;
  font-weight: 680;
}

.summary-grid strong {
  margin-top: 6px;
  color: var(--navy-900);
  font-size: 1.35rem;
}

.summary-grid small {
  margin-top: auto;
  color: var(--slate-500);
  font-size: 0.65rem;
}

.tabs {
  display: flex;
  gap: 25px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--slate-200);
}

.tabs a {
  position: relative;
  padding: 10px 2px 11px;
  color: var(--slate-600);
  font-size: 0.77rem;
  font-weight: 680;
  text-decoration: none;
}

.tabs a::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--blue-600);
  opacity: 0;
}

.tabs a:hover,
.tabs a.is-active {
  color: var(--blue-700);
}

.tabs a.is-active::after {
  opacity: 1;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.85fr);
  gap: 17px;
}

.detail-grid__main,
.detail-grid__aside {
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.placeholder-lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 22px 10px;
}

.placeholder-lines span {
  width: 76%;
  height: 9px;
  background: var(--slate-150);
  border-radius: 999px;
}

.placeholder-lines span:nth-child(2) { width: 92%; }
.placeholder-lines span:nth-child(3) { width: 58%; }
.placeholder-lines span:nth-child(4) { width: 68%; }

.muted-copy {
  margin: 8px 22px 22px;
  color: var(--slate-500);
  font-size: 0.68rem;
}

.timeline-empty {
  display: flex;
  gap: 13px;
  padding: 22px;
}

.timeline-empty > span {
  width: 12px;
  height: 12px;
  margin-top: 3px;
  background: var(--slate-300);
  border: 3px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--slate-300);
}

.timeline-empty strong {
  font-size: 0.78rem;
}

.timeline-empty p {
  margin: 4px 0 0;
  color: var(--slate-500);
  font-size: 0.69rem;
}

.error-state {
  position: relative;
  display: flex;
  min-height: 570px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 60px 24px;
  overflow: hidden;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
}

.error-state__code {
  position: absolute;
  top: 50%;
  left: 50%;
  color: var(--slate-100);
  font-size: clamp(10rem, 30vw, 23rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.09em;
  transform: translate(-50%, -54%);
  user-select: none;
}

.error-state > *:not(.error-state__code) {
  position: relative;
  z-index: 1;
}

.error-state h1 {
  margin-bottom: 12px;
}

.error-state > p:not(.eyebrow) {
  max-width: 520px;
  color: var(--slate-600);
}

.error-state__actions {
  display: flex;
  gap: 9px;
  margin-top: 14px;
}

.auth-body {
  min-height: 100vh;
  background: var(--white);
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(420px, 0.95fr) minmax(500px, 1.05fr);
}

.auth-story {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  padding: 42px clamp(38px, 6vw, 86px);
  overflow: hidden;
  color: #dce7f7;
  background:
    radial-gradient(circle at 15% 20%, rgb(54 111 213 / 37%), transparent 34%),
    radial-gradient(circle at 95% 85%, rgb(20 142 119 / 20%), transparent 33%),
    linear-gradient(145deg, #0a1727, #142a48);
}

.auth-story::before,
.auth-story::after {
  position: absolute;
  content: "";
  border: 1px solid rgb(255 255 255 / 6%);
  border-radius: 50%;
}

.auth-story::before {
  width: 420px;
  height: 420px;
  right: -230px;
  top: 12%;
}

.auth-story::after {
  width: 640px;
  height: 640px;
  right: -350px;
  top: 2%;
}

.auth-story > * {
  position: relative;
  z-index: 1;
}

.auth-story__content {
  max-width: 560px;
  margin: auto 0;
  padding: 60px 0;
}

.auth-story__content h1 {
  margin-bottom: 22px;
  color: var(--white);
  font-size: clamp(2.55rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.auth-story__content > p:not(.eyebrow) {
  max-width: 500px;
  color: #aebed2;
  font-size: 1rem;
  line-height: 1.75;
}

.auth-benefits {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.auth-benefits li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d3dfed;
  font-size: 0.82rem;
  font-weight: 620;
}

.auth-benefits .icon {
  width: 17px;
  height: 17px;
  color: #5bd7b0;
}

.auth-story__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #778ca7;
  font-size: 0.65rem;
}

.environment-pill--inverse {
  color: #9cafc6;
}

.auth-panel {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 52px clamp(28px, 7vw, 110px) 28px;
  background: var(--white);
}

.auth-panel__content {
  width: min(100%, 440px);
  margin: auto 0;
}

.auth-panel__legal {
  max-width: 430px;
  margin: 42px 0 0;
  color: var(--slate-500);
  font-size: 0.65rem;
  text-align: center;
}

.auth-heading {
  margin-bottom: 23px;
}

.auth-heading__icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 23px;
  place-items: center;
  color: var(--blue-700);
  background: var(--blue-100);
  border-radius: 13px;
}

.auth-heading h2 {
  margin-bottom: 8px;
  font-size: 1.8rem;
}

.auth-heading > p:not(.eyebrow) {
  margin: 0;
  color: var(--slate-600);
  font-size: 0.86rem;
}

.auth-heading--recovery {
  margin-top: 32px;
}

.auth-form {
  margin-top: 21px;
}

.auth-form fieldset {
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.auth-form fieldset:disabled {
  opacity: 0.72;
}

.field label,
.field__label-row {
  color: var(--navy-900);
  font-size: 0.75rem;
  font-weight: 690;
}

.field > label,
.field__label-row {
  display: flex;
  margin-bottom: 7px;
}

.field__label-row {
  align-items: center;
  justify-content: space-between;
}

.field__label-row a {
  color: var(--blue-700);
  font-size: 0.69rem;
  text-decoration: none;
}

.input-shell {
  min-height: 47px;
  padding-left: 13px;
}

.input-shell input {
  height: 45px;
}

.input-action {
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
}

.field__hint {
  margin: 7px 0 0;
  color: var(--slate-500);
  font-size: 0.68rem;
}

.check-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--slate-600);
  font-size: 0.72rem;
}

.check-field input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue-600);
}

.auth-support {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 26px;
  color: var(--slate-500);
  font-size: 0.72rem;
}

.auth-support a {
  color: var(--blue-700);
  font-weight: 680;
  text-decoration: none;
}

@media (max-width: 1250px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .gate-grid li:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--slate-200);
  }

  .gate-grid li:nth-child(4) {
    border-top: 1px solid var(--slate-200);
  }
}

@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-101%);
    transition: transform 0.2s ease;
    box-shadow: 20px 0 55px rgb(8 20 34 / 28%);
  }

  .sidebar__close,
  .topbar__menu {
    display: inline-flex;
  }

  .workspace {
    margin-left: 0;
  }

  .sidebar-backdrop {
    position: fixed;
    z-index: 40;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    background: rgb(8 20 34 / 48%);
    border: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .nav-is-open {
    overflow: hidden;
  }

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

  .nav-is-open .sidebar-backdrop {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

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

  .panel--span-3 {
    grid-column: span 2;
  }

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

  .auth-shell {
    grid-template-columns: minmax(340px, 0.85fr) minmax(460px, 1.15fr);
  }

  .auth-story {
    padding-inline: 38px;
  }

  .auth-story__content h1 {
    font-size: 3.3rem;
  }
}

@media (max-width: 800px) {
  .topbar {
    padding: 0 17px;
  }

  .account-chip__copy,
  .account-chip > .icon {
    display: none;
  }

  .preview-banner {
    padding-inline: 18px;
  }

  .preview-banner > div {
    flex-direction: column;
    gap: 0;
  }

  .preview-banner span {
    white-space: normal;
  }

  .main-content {
    padding-top: 23px;
  }

  .page-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .page-header__actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .page-header__actions .button {
    flex: 1;
  }

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

  .dashboard-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .panel--span-2,
  .panel--span-3 {
    grid-column: span 1;
  }

  .data-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .search-field {
    width: 100%;
    min-width: 100%;
  }

  .toolbar-field {
    min-width: 0;
    flex: 1;
  }

  .auth-shell {
    display: block;
  }

  .auth-story {
    min-height: auto;
    padding: 26px 28px 34px;
  }

  .auth-story__content {
    padding: 65px 0 28px;
  }

  .auth-story__content h1 {
    font-size: 3rem;
  }

  .auth-benefits,
  .auth-story__footer {
    display: none;
  }

  .auth-panel {
    min-height: auto;
    padding: 52px 26px 26px;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 1.75rem;
  }

  .topbar__context span,
  .topbar__context .icon {
    display: none;
  }

  .preview-banner .icon-button {
    align-self: flex-start;
  }

  .metric-grid,
  .integration-grid,
  .settings-grid,
  .summary-grid,
  .gate-grid {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 128px;
  }

  .workstream-item {
    align-items: flex-start;
  }

  .workstream-item .status-badge {
    display: none;
  }

  .panel__header,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .gate-grid li,
  .gate-grid li + li,
  .gate-grid li:nth-child(3),
  .gate-grid li:nth-child(4) {
    border-top: 1px solid var(--slate-200);
    border-left: 0;
  }

  .gate-grid li:first-child {
    border-top: 0;
  }

  .data-toolbar .button,
  .toolbar-field {
    width: 100%;
    flex: auto;
  }

  .app-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .tabs {
    gap: 18px;
    overflow-x: auto;
  }

  .auth-story__content h1 {
    font-size: 2.45rem;
  }
}

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

/* Accesso istituzionale */
.auth-body {
  background: #f3f6fa;
}

.auth-shell {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.auth-panel {
  display: flex;
  width: min(100%, 520px);
  min-height: auto;
  align-items: stretch;
  flex-direction: column;
  padding: 0;
  background: transparent;
}

.auth-panel__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-bottom: 28px;
  text-align: left;
}

.auth-panel__brand .brand {
  flex: 0 0 auto;
}

.auth-panel__company {
  margin: 0 0 3px;
  color: var(--slate-500);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-panel__brand h2 {
  margin: 0;
  color: var(--slate-900);
  font-size: 1.15rem;
}

.auth-panel__card {
  padding: 38px 42px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 18px;
  box-shadow: 0 18px 55px rgb(15 35 60 / 9%);
}

.auth-heading {
  text-align: center;
}

.auth-heading__icon {
  margin-inline: auto;
}

.auth-heading h1 {
  margin-bottom: 8px;
  font-size: 1.8rem;
}

.auth-panel__card .field,
.auth-panel__card .check-field {
  text-align: left;
}

.auth-panel__legal {
  max-width: none;
  margin: 24px 0 0;
  font-size: 0.7rem;
}

.auth-technical {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 12px;
  color: var(--slate-500);
  font-size: 0.62rem;
}

@media (max-width: 800px) {
  .auth-shell {
    display: flex;
    padding: 28px 20px;
  }

  .auth-panel {
    min-height: auto;
    padding: 0;
  }

  .auth-panel__card {
    padding: 30px 24px;
  }

  .auth-panel__brand {
    align-items: center;
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .auth-technical {
    align-items: center;
    flex-direction: column;
    gap: 5px;
  }
}

.integration-create {
  overflow: hidden;
  padding: 0;
}

.integration-create__header {
  align-items: flex-start;
  padding: 28px 30px 24px;
  background: linear-gradient(135deg, #f7f9fc, #eef4fb);
  border-bottom: 1px solid var(--slate-200);
}

.integration-create__header > div {
  max-width: 680px;
}

.integration-create__intro {
  max-width: 650px;
  margin: 8px 0 0;
  color: var(--slate-600);
  font-size: 0.82rem;
  line-height: 1.55;
}

.integration-create__form {
  padding: 28px 30px 30px;
}

.integration-create__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 24px;
}

.integration-create__wide {
  grid-column: 1 / -1;
}

.integration-create .field small {
  display: block;
  margin-top: 7px;
  color: var(--slate-500);
  line-height: 1.45;
}

.field__optional {
  color: var(--slate-500);
  font-size: 0.68rem;
  font-weight: 500;
}

.integration-create__advanced {
  margin-top: 24px;
  padding: 0 18px;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: 12px;
}

.integration-create__advanced summary {
  padding: 16px 0;
  color: var(--slate-700);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}

.integration-create__advanced[open] {
  padding-bottom: 18px;
}

.integration-create__advanced textarea {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.integration-create__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--slate-200);
}

.integration-create__footer div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.integration-create__footer strong {
  color: var(--slate-900);
  font-size: 0.76rem;
}

.integration-create__footer span {
  color: var(--slate-500);
  font-size: 0.7rem;
}

@media (max-width: 700px) {
  .integration-create__header,
  .integration-create__form {
    padding-inline: 20px;
  }

  .integration-create__grid {
    grid-template-columns: 1fr;
  }

  .integration-create__wide {
    grid-column: auto;
  }

  .integration-create__footer {
    align-items: stretch;
    flex-direction: column;
  }

  .integration-create__footer .button {
    justify-content: center;
    width: 100%;
  }
}


.temu-mapping-override {
  display: grid;
  gap: 0.45rem;
  min-width: 20rem;
}

.temu-mapping-override input[type="search"] {
  min-width: 18rem;
}

.temu-mapping-override small {
  max-width: 28rem;
}


.temu-taxonomy-loading {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -0.15rem;
  animation: temu-taxonomy-spin 0.7s linear infinite;
}

.temu-taxonomy-loading[hidden] {
  display: none;
}

@keyframes temu-taxonomy-spin {
  to {
    transform: rotate(360deg);
  }
}
