html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.product-ficha .product-form fieldset legend {
  color: #1a2b3c;
}

.product-ficha .product-form .form-control[readonly] {
  cursor: default;
  border-color: #dee2e6;
}

.product-ficha .product-form .form-label {
  letter-spacing: 0.01em;
}

.edam-home {
  --edam-ink: #10233a;
  --edam-muted: #5b6b7c;
  --edam-dim: #0f6e7c;
  --edam-sat: #c45c26;
  --edam-hub: #163a5f;
  --edam-panel: #f3f6f8;
  --edam-line: rgba(16, 35, 58, 0.12);
}

.edam-home__intro {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, 0.7fr);
  gap: 1.5rem 2rem;
  align-items: end;
  margin-bottom: 1.35rem;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  box-sizing: border-box;
  padding: 0.5rem clamp(0.85rem, 3vw, 2rem) 0.35rem;
}

.edam-home__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  font-weight: 700;
  color: var(--edam-dim);
  margin-bottom: 0.55rem;
}

.edam-home__title {
  font-size: clamp(1.55rem, 3.2vw, 2.75rem);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--edam-ink);
  margin: 0 0 0.65rem;
  white-space: nowrap;
}

.edam-home__lead {
  margin: 0 0 1.15rem;
  color: var(--edam-muted);
  max-width: none;
  font-size: clamp(0.95rem, 1.25vw, 1.15rem);
  line-height: 1.4;
  white-space: nowrap;
}

.edam-home__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.15rem;
}

.edam-home__cta {
  background: var(--edam-ink);
  border-color: var(--edam-ink);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.7rem 1.25rem;
  border-radius: 0.65rem;
}

.edam-home__cta:hover,
.edam-home__cta:focus {
  background: #0c1b2d;
  border-color: #0c1b2d;
  color: #fff;
}

.edam-home__hint {
  font-size: 1rem;
  color: var(--edam-muted);
}

.edam-home__aside {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.edam-home__stat {
  background: linear-gradient(165deg, #fff 0%, #f4f7f9 100%);
  border: 1px solid var(--edam-line);
  border-radius: 0.9rem;
  padding: 0.95rem 0.75rem;
  text-align: center;
}

.edam-home__stat-value {
  display: block;
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  font-weight: 750;
  color: var(--edam-ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.edam-home__stat-label {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--edam-muted);
}

.snowflake {
  --snowflake-h: calc(100dvh - 15.5rem);
  display: grid;
  grid-template-columns: 1fr minmax(170px, 230px) 1fr;
  gap: 0.85rem;
  height: var(--snowflake-h);
  min-height: 420px;
  max-height: 860px;
  border-radius: 1.1rem;
  background:
    radial-gradient(circle at 50% 50%, rgba(15, 110, 124, 0.1), transparent 42%),
    linear-gradient(160deg, #eef3f6 0%, #f8fafb 55%, #e8eef2 100%);
  border: 1px solid var(--edam-line);
  overflow: hidden;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  box-sizing: border-box;
  padding: 1rem clamp(0.85rem, 3vw, 2rem);
}

.snowflake__col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--edam-line);
  border-radius: 0.85rem;
  padding: 0.65rem;
  backdrop-filter: blur(4px);
}

.snowflake__col-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--edam-ink);
  margin-bottom: 0.55rem;
  flex: 0 0 auto;
}

.snowflake__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
}

.snowflake__dot--dim { background: var(--edam-dim); }
.snowflake__dot--sat { background: var(--edam-sat); }

.snowflake__count {
  margin-left: auto;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--edam-muted);
  background: var(--edam-panel);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}

.snowflake__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: 0.4rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

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

.snowflake__chip {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
  min-height: 0;
  padding: 0.35rem 0.5rem;
  border-radius: 0.55rem;
  border: 1px solid transparent;
  background: #fff;
  box-shadow: 0 1px 0 rgba(16, 35, 58, 0.04);
  transition: transform 120ms ease, border-color 120ms ease;
}

.snowflake__chip:hover {
  transform: translateY(-1px);
}

.snowflake__chip--dim {
  border-color: rgba(15, 110, 124, 0.18);
}

.snowflake__chip--sat {
  border-color: rgba(196, 92, 38, 0.2);
}

.snowflake__chip-label {
  font-size: clamp(0.82rem, 1.35vh, 1.02rem);
  font-weight: 650;
  color: var(--edam-ink);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.snowflake__chip-code {
  font-size: clamp(0.7rem, 1.05vh, 0.84rem);
  color: var(--edam-muted);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.snowflake__hub-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
}

.snowflake__rays {
  position: absolute;
  inset: 12% 8%;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from 0deg, rgba(15, 110, 124, 0.12) 0 2deg, transparent 2deg 18deg);
  opacity: 0.55;
  pointer-events: none;
}

.snowflake__hub {
  position: relative;
  z-index: 1;
  width: min(100%, 230px);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.25rem;
  padding: 1.15rem;
  border-radius: 50%;
  color: #fff;
  background:
    radial-gradient(circle at 30% 25%, #2b6ea3, transparent 45%),
    linear-gradient(160deg, #1b4b78, #10233a 70%);
  border: 4px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 0 0 8px rgba(22, 58, 95, 0.08),
    0 18px 40px rgba(16, 35, 58, 0.22);
  animation: hubPulse 4.5s ease-in-out infinite;
}

.snowflake__hub-kicker {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.8;
}

.snowflake__hub-title {
  font-size: clamp(1.05rem, 1.7vw, 1.28rem);
  line-height: 1.1;
}

.snowflake__hub-sub {
  font-size: 1.15rem;
  font-weight: 650;
}

.snowflake__hub-hint {
  margin-top: 0.3rem;
  font-size: 0.78rem;
  opacity: 0.75;
}

@keyframes hubPulse {
  0%, 100% { box-shadow: 0 0 0 8px rgba(22, 58, 95, 0.08), 0 18px 40px rgba(16, 35, 58, 0.22); }
  50% { box-shadow: 0 0 0 14px rgba(15, 110, 124, 0.12), 0 18px 40px rgba(16, 35, 58, 0.25); }
}

.edam-docs__panel {
  margin-top: 1.35rem;
  border: 1px solid var(--edam-line);
  border-radius: 0.85rem;
  background: #fff;
  padding: 1rem 1.15rem;
}

.edam-docs__panel > summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 1.08rem;
  color: var(--edam-ink);
}

@media (max-width: 991.98px) {
  .edam-home__intro {
    grid-template-columns: 1fr;
  }

  .edam-home__title,
  .edam-home__lead {
    white-space: normal;
  }

  .edam-home__aside {
    max-width: 28rem;
  }

  .snowflake {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(180px, 28%) auto;
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: visible;
  }

  .snowflake__hub {
    width: 180px;
  }

  .snowflake__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
    grid-auto-rows: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .snowflake__hub {
    animation: none;
  }
}

.products-page {
  --products-gutter: 16px;
  width: calc(100vw - (var(--products-gutter) * 2));
  max-width: calc(100vw - (var(--products-gutter) * 2));
  margin-left: calc(50% - 50vw + var(--products-gutter));
  margin-right: calc(50% - 50vw + var(--products-gutter));
  box-sizing: border-box;
}

.products-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

.products-metric {
  background: #fff;
  border: 1px solid #e2e6ea;
  border-radius: 0.65rem;
  padding: 0.65rem 0.75rem;
  min-width: 0;
}

.products-metric__value {
  display: block;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: 700;
  color: #10233a;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.products-metric__label {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.products-list__toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem 0.55rem 1.15rem;
  flex: 0 0 auto;
}

.products-list__heading {
  min-width: 0;
}

.products-list__title-row {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.products-list__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #10233a;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.products-list__entity code {
  font-size: 0.72rem;
  color: #0f6e7c;
  background: rgba(15, 110, 124, 0.08);
  border-radius: 0.35rem;
  padding: 0.12rem 0.4rem;
}

.products-list__subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: #6c757d;
}

.products-list__reload {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  border: 1px solid #d7dee5;
  background: #fff;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
}

.products-list__reload:hover {
  background: #f3f7f8;
  border-color: #0f6e7c;
  color: #0f6e7c;
}

.products-search {
  position: relative;
  z-index: 30;
  margin: 0 0.85rem 0.65rem;
  padding: 0.55rem 0.65rem;
  flex: 0 0 auto;
  background: linear-gradient(180deg, #f5f8fa 0%, #eef3f6 100%);
  border: 1px solid #e2e8ee;
  border-radius: 0.75rem;
}

.products-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.55rem 0.65rem;
}

.products-filter {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  margin: 0;
  min-width: 0;
}

.products-filter__label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5b6b7c;
}

.products-filter__label .bi {
  font-size: 0.78rem;
  color: #0f6e7c;
}

.products-filter__control {
  appearance: none;
  border: 1px solid #d5dde5;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='%235b6b7c' d='M1.5 5.5L8 12l6.5-6.5'/%3E%3C/svg%3E") no-repeat right 0.65rem center;
  background-size: 10px;
  border-radius: 0.55rem;
  padding: 0.42rem 1.7rem 0.42rem 0.7rem;
  font-size: 0.86rem;
  color: #10233a;
  min-height: 2.15rem;
  max-width: 11.5rem;
  box-shadow: 0 1px 0 rgba(16, 35, 58, 0.03);
}

.products-filter__control:focus {
  outline: none;
  border-color: #0f6e7c;
  box-shadow: 0 0 0 3px rgba(15, 110, 124, 0.15);
}

.products-filter--size .products-filter__control {
  max-width: 4.75rem;
  min-width: 4.75rem;
}

.products-brand-picker {
  position: relative;
  z-index: 40;
  width: 13.5rem;
  max-width: 13.5rem;
}

.products-brand-picker__toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  min-height: 2.15rem;
  padding: 0.35rem 0.55rem 0.35rem 0.65rem;
  border: 1px solid #d5dde5;
  border-radius: 0.55rem;
  background: #fff;
  box-shadow: 0 1px 0 rgba(16, 35, 58, 0.03);
  color: #10233a;
  font-size: 0.86rem;
  font-weight: 600;
  text-align: left;
}

.products-brand-picker__toggle:hover {
  border-color: #b7c4d0;
}

.products-brand-picker__toggle:focus,
.products-brand-picker__toggle[aria-expanded="true"] {
  outline: none;
  border-color: #0f6e7c;
  box-shadow: 0 0 0 3px rgba(15, 110, 124, 0.15);
}

.products-brand-picker__label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.products-brand-picker__badge {
  flex: 0 0 auto;
  min-width: 1.6rem;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: #10233a;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-align: center;
}

.products-brand-picker__caret {
  flex: 0 0 auto;
  font-size: 0.72rem;
  color: #5b6b7c;
}

.products-brand-picker__menu {
  z-index: 2000 !important;
  width: 18.5rem;
  max-width: min(18.5rem, 92vw);
  padding: 0.45rem;
  border: 1px solid #dbe3ea;
  border-radius: 0.75rem;
  box-shadow: 0 14px 36px rgba(16, 35, 58, 0.16);
}

.products-brand-picker__search {
  position: relative;
  margin-bottom: 0.4rem;
}

.products-brand-picker__search .bi {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  color: #8a97a6;
  font-size: 0.85rem;
  pointer-events: none;
}

.products-brand-picker__search input {
  padding-left: 2rem;
  border-radius: 0.5rem;
  border-color: #d5dde5;
}

.products-brand-picker__list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: min(50vh, 20rem);
  overflow-y: auto;
}

.products-brand-picker__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 0.45rem;
  padding: 0.45rem 0.55rem;
  color: #10233a;
  font-size: 0.86rem;
  text-align: left;
}

.products-brand-picker__item:hover {
  background: #f1f6f8;
}

.products-brand-picker__item.is-active {
  background: rgba(15, 110, 124, 0.12);
  color: #0b5560;
  font-weight: 650;
}

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

.products-brand-count {
  flex: 0 0 auto;
  min-width: 1.5rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #eef2f5;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-align: center;
}

.products-brand-picker__item.is-active .products-brand-count {
  background: #0f6e7c;
  color: #fff;
}

@media (max-width: 991.98px) {
  .products-brand-picker {
    width: min(13.5rem, 100%);
  }
}

.products-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.55rem 1.15rem;
  border-top: 1px solid #edf0f2;
  background: #fff;
  flex: 0 0 auto;
}

.products-pager__info {
  font-size: 0.8rem;
  color: #6c757d;
}

.products-workspace {
  --products-h: calc(100dvh - 12.5rem);
  --list-width: 40%;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  gap: 0;
  width: 100%;
  height: var(--products-h);
  min-height: 380px;
  border: 1px solid #dee2e6;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fff;
  box-sizing: border-box;
}

.products-workspace.is-open {
  grid-template-columns: var(--list-width) 10px 1fr;
}

.products-workspace.is-resizing {
  cursor: col-resize;
  user-select: none;
}

.products-workspace.is-resizing iframe,
.products-workspace.is-resizing .product-ficha {
  pointer-events: none;
}

.products-list {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.products-resizer {
  display: none;
  align-items: center;
  justify-content: center;
  width: 10px;
  cursor: col-resize;
  background: #edf0f2;
  border-left: 1px solid #e2e6ea;
  border-right: 1px solid #e2e6ea;
  color: #6c757d;
  user-select: none;
  touch-action: none;
}

.products-workspace.is-open .products-resizer {
  display: flex;
}

.products-resizer:hover,
.products-resizer:focus-visible,
.products-workspace.is-resizing .products-resizer {
  background: #d9e8ec;
  color: #0f6e7c;
  outline: none;
}

.products-resizer__grip {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  opacity: 0.9;
}

.products-list__meta {
  font-size: 0.82rem;
  color: #6c757d;
  flex: 0 0 auto;
  padding: 0 1rem 0.45rem 1.15rem;
}

.products-list__table {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.products-list__table table {
  margin-bottom: 0;
}

.products-list__table thead.sticky-top,
.products-list__table .sticky-top {
  z-index: 2;
  position: sticky;
  top: 0;
}

.products-list__table thead th:first-child,
.products-list__table tbody td:first-child {
  padding-left: 1.15rem;
}

.products-list__table thead th:last-child,
.products-list__table tbody td:last-child {
  padding-right: 1rem;
}

.products-list__table .product-row {
  cursor: pointer;
}

.products-list__table .product-row.is-active {
  background: rgba(15, 110, 124, 0.12) !important;
  outline: 2px solid rgba(15, 110, 124, 0.35);
  outline-offset: -2px;
}

.products-panel {
  display: none;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #f7f9fb;
}

.products-workspace.is-open .products-panel {
  display: flex;
}

.products-panel__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.15rem;
  border-bottom: 1px solid #edf0f2;
  background: #fff;
  flex: 0 0 auto;
}

.products-panel__title {
  font-weight: 600;
  color: #10233a;
}

.products-panel__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0.85rem 1.15rem 1.25rem;
}

.products-panel__empty,
.products-panel__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 220px;
  padding: 2rem 1rem;
}

.product-ficha--panel .product-form fieldset {
  background: #fff;
}

@media (max-width: 991.98px) {
  .products-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .products-workspace {
    --products-h: calc(100dvh - 16rem);
  }

  .products-workspace.is-open {
    grid-template-columns: 1fr;
    grid-template-rows: 38% 0 1fr;
  }

  .products-resizer {
    display: none !important;
    height: 0;
    width: auto;
  }

  .products-list {
    border-bottom: 1px solid #edf0f2;
  }
}

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