/* INTERSPORT Partner Platform — brand overrides for Sneat */
:root {
  --bs-primary: #164196;
  --bs-primary-rgb: 22, 65, 150;
  --bs-danger: #e30613;
  --bs-danger-rgb: 227, 6, 19;
  --brand-primary: #164196;
  --brand-secondary: #e30613;
  --brand-muted: #5c6570;
  --brand-border: #d5dce6;
}

.bg-primary,
.btn-primary {
  --bs-bg-opacity: 1;
  background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity)) !important;
  border-color: #164196 !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #12357c !important;
  border-color: #12357c !important;
}

.text-primary {
  --bs-text-opacity: 1;
  color: rgba(var(--bs-primary-rgb), var(--bs-text-opacity)) !important;
}

.btn-danger,
.bg-danger {
  background-color: #e30613 !important;
  border-color: #e30613 !important;
}

a {
  color: #164196;
}

a:hover {
  color: #e30613;
}

/* Logo in sidebar / auth */
.app-brand-logo-img {
  display: block;
  width: 100%;
  max-width: 148px;
  height: auto;
}

.layout-menu .app-brand {
  padding-top: 1rem;
  padding-bottom: 0.75rem;
}

.layout-menu .app-brand-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.65rem 0.75rem;
  background: #fff;
  border-radius: 0.5rem;
  margin-inline: 0.5rem;
}

.layout-menu .app-brand-text,
.auth-brand-sub {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #164196;
  line-height: 1.2;
}

.authentication-wrapper .app-brand-link {
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.authentication-wrapper .app-brand-logo-img {
  max-width: 200px;
}

.authentication-wrapper .auth-brand-sub {
  color: var(--brand-muted);
}

/* Full-bleed layout: the navbar, main content and footer span the full width
   of the page area (left-aligned) instead of Sneat's centered max-width
   container, so the main container is always as wide as possible. */
.layout-page .container-xxl {
  max-width: none;
}

/* Header (detached navbar) should also span the full page width and align its
   left edge with the content container (which uses a 1.625rem side gutter),
   instead of Sneat's centered, inset detached card. */
.layout-page .layout-navbar.navbar-detached,
.layout-page .layout-navbar.navbar-detached.container-xxl {
  max-width: none;
  width: auto;
  margin-inline: 0;
  padding-inline: 1.625rem;
}

/* Compatibility for existing page markup */
.content-wrapper .card {
  margin-bottom: 1.5rem;
}

/* Legacy pages put content directly in .card (no .card-body) */
.content-wrapper .card:not(:has(> .card-body, > .card-header)) {
  padding: 1.25rem;
}

.content-wrapper table:not(.table) {
  width: 100%;
  border-collapse: collapse;
}

.content-wrapper table:not(.table) th,
.content-wrapper table:not(.table) td {
  text-align: left;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--brand-border);
}

.muted {
  color: var(--brand-muted) !important;
}

.partner-type-hints {
  margin: 0.5rem 0 1rem;
  padding-left: 1.15rem;
  color: var(--brand-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.partner-type-hints li + li {
  margin-top: 0.3rem;
}

.partner-type-hints strong {
  color: inherit;
  font-weight: 600;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-pending { background: #fef3c7; color: #92400e; }
.badge-active { background: #d1fae5; color: #065f46; }
.badge-blocked { background: #fee2e2; color: #991b1b; }
.badge-draft { background: #e5e7eb; color: #374151; }
.badge-inactive { background: #f3f4f6; color: #6b7280; }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.badge-invalid { background: #ffedd5; color: #9a3412; }
.badge-new { background: #dbeafe; color: #1e40af; }
.badge-intake { background: #dbeafe; color: #1e40af; }
.badge-accepted { background: #d1fae5; color: #065f46; }
.badge-shipped { background: #d1fae5; color: #065f46; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }
.badge-processing { background: #fef3c7; color: #92400e; }
.badge-in_progress { background: #fef3c7; color: #92400e; }
.badge-reordered { background: #fef3c7; color: #92400e; }
.badge-done { background: #d1fae5; color: #065f46; }
.badge-failed { background: #fee2e2; color: #991b1b; }
.badge-preview { background: #e0e7ff; color: #3730a3; }
.badge-fetching { background: #dbeafe; color: #1e40af; }

.form-grid {
  display: grid;
  gap: 0.75rem;
  max-width: 720px;
  margin-top: 1rem;
}

.form-grid label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.form-grid input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.form-grid select,
.form-grid textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--brand-border);
  border-radius: 6px;
}

.form-grid input[type="checkbox"],
.form-grid input[type="radio"] {
  width: auto;
  padding: 0;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--brand-primary) 35%, transparent);
  border-color: var(--brand-primary);
}

.meili-smart-filters {
  max-width: none;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  align-items: end;
  margin: 0 0 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--brand-border);
}

.meili-smart-filters__search {
  grid-column: 1 / -1;
  max-width: 36rem;
}

.meili-smart-filters__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.meili-smart-filters__hint {
  margin: 0 0 1rem;
  font-size: 0.8rem;
}

/* List pages (Angebote, Bestellungen): results left (80%),
   sticky filter sidebar right (max 20%). */
.list-layout {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.list-layout__results {
  flex: 1 1 80%;
  min-width: 0;
}

.list-layout__filters {
  flex: 0 0 20%;
  max-width: 20%;
}

.list-filters-sticky {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow: auto;
}

.list-filters__title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

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

.table-row--clickable {
  cursor: pointer;
}

.table-row--clickable:hover > td {
  background-color: rgba(22, 65, 150, 0.06);
}

.table-row--clickable:focus {
  outline: 2px solid #164196;
  outline-offset: -2px;
}

/* Narrow sidebar: stack filter fields in a single column */
.list-layout__filters .meili-smart-filters,
.list-layout__filters .form-grid {
  grid-template-columns: 1fr;
  margin: 0;
  padding-bottom: 0;
  border-bottom: none;
  max-width: none;
}

.list-layout__filters .meili-smart-filters__search {
  max-width: none;
}

.list-layout__filters .meili-smart-filters__hint {
  margin: 0.75rem 0 0;
}

@media (max-width: 992px) {
  .list-layout {
    flex-direction: column;
  }

  .list-layout__filters {
    order: -1;
    flex-basis: auto;
    max-width: none;
    width: 100%;
  }

  .list-filters-sticky {
    position: static;
    max-height: none;
  }

  .list-layout__filters .meili-smart-filters,
  .list-layout__filters .form-grid {
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  }
}

/* Detail pages (e.g. Reorder): main content left, sticky status sidebar right. */
.detail-layout {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.detail-layout__main {
  flex: 1 1 auto;
  min-width: 0;
}

.detail-layout__aside {
  flex: 0 0 340px;
  max-width: 360px;
}

.detail-aside-sticky {
  position: sticky;
  top: 1.5rem;
}

.status-flow-card {
  margin-bottom: 1.5rem;
}

/* Lifecycle stepper */
.status-steps {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.status-step {
  position: relative;
  padding: 0 0 1rem 1.75rem;
}

.status-step::before {
  content: "";
  position: absolute;
  left: 0.4rem;
  top: 1rem;
  bottom: -0.1rem;
  width: 2px;
  background: var(--brand-border, #d9dee3);
}

.status-step:last-child {
  padding-bottom: 0;
}

.status-step:last-child::before {
  display: none;
}

.status-step__marker {
  position: absolute;
  left: 0;
  top: 0.2rem;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: var(--brand-surface, #fff);
  border: 2px solid var(--brand-border, #d9dee3);
}

.status-step__body {
  display: block;
}

.status-step__label {
  display: block;
  font-weight: 600;
  line-height: 1.2;
}

.status-step__desc {
  display: block;
  font-size: 0.8rem;
  color: var(--brand-muted, #697a8d);
  margin-top: 0.15rem;
}

.status-step.is-done .status-step__marker {
  background: #71dd37;
  border-color: #71dd37;
}

.status-step.is-current .status-step__marker {
  background: #696cff;
  border-color: #696cff;
  box-shadow: 0 0 0 3px color-mix(in srgb, #696cff 22%, transparent);
}

.status-step.is-failed .status-step__marker {
  background: #ff3e1d;
  border-color: #ff3e1d;
}

.status-step.is-upcoming .status-step__label,
.status-step.is-upcoming .status-step__desc {
  opacity: 0.6;
}

.status-step.is-current .status-step__label {
  color: #696cff;
}

.status-step.is-failed .status-step__label {
  color: #ff3e1d;
}

/* Recorded status timeline */
.status-flow-subhead {
  margin: 1.25rem 0 0.5rem;
  font-size: 0.95rem;
}

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

.status-timeline__item {
  border-left: 2px solid var(--brand-border, #d9dee3);
  padding: 0 0 0.9rem 0.85rem;
  position: relative;
}

.status-timeline__item:last-child {
  padding-bottom: 0;
}

.status-timeline__item.is-ordered {
  border-left-color: #71dd37;
}

.status-timeline__item.is-failure {
  border-left-color: #ff3e1d;
}

.status-timeline__time {
  font-size: 0.75rem;
  color: var(--brand-muted, #697a8d);
}

.status-timeline__title {
  font-size: 0.9rem;
}

.status-timeline__note {
  font-size: 0.8rem;
  color: var(--brand-muted, #697a8d);
  margin-top: 0.15rem;
}

.status-timeline__actor {
  font-size: 0.75rem;
  margin-top: 0.1rem;
}

@media (max-width: 992px) {
  .detail-layout {
    flex-direction: column;
  }

  .detail-layout__aside {
    flex-basis: auto;
    max-width: none;
    width: 100%;
  }

  .detail-aside-sticky {
    position: static;
  }
}

.edi-form .edi-fieldset {
  border: 1px solid var(--brand-border);
  border-radius: 8px;
  padding: 0.85rem 1rem 1rem;
  margin: 1rem 0 0;
  background: color-mix(in srgb, var(--brand-surface, #fff) 92%, var(--brand-border));
}

.edi-form .edi-fieldset legend {
  float: none;
  width: auto;
  padding: 0 0.4rem;
  margin-bottom: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.edi-form .edi-fieldset .form-grid {
  margin-top: 0.5rem;
  max-width: none;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.edi-form .edi-fieldset .form-grid > div:has(textarea) {
  grid-column: 1 / -1;
}

.edi-json-preview {
  max-height: min(50vh, 24rem);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0.85rem 1rem;
  margin: 0.5rem 0 0;
  border: 1px solid var(--brand-border);
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.8rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.btn-secondary {
  background: var(--brand-secondary) !important;
  border-color: var(--brand-secondary) !important;
  color: #fff !important;
}

.btn-secondary:hover {
  filter: brightness(1.08);
  color: #fff !important;
}

.btn-success {
  background: #059669 !important;
  border-color: #059669 !important;
  color: #fff !important;
}

.btn-muted {
  display: inline-block;
  background: #e5e7eb;
  color: #111;
  border: 0;
  padding: 0.55rem 1rem;
  border-radius: 0.375rem;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
}

/* Legacy pages use bare .btn for primary actions */
button.btn:not([class*="btn-"]),
a.btn:not([class*="btn-"]),
input.btn:not([class*="btn-"]) {
  background-color: #164196;
  border-color: #164196;
  color: #fff;
}

button.btn:not([class*="btn-"]):hover,
a.btn:not([class*="btn-"]):hover {
  background-color: #12357c;
  border-color: #12357c;
  color: #fff;
}

.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.detail-list {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0.5rem 1rem;
  margin: 0 0 1.5rem;
}

.detail-list dt {
  font-weight: 600;
  color: #444;
}

.detail-list dd {
  margin: 0;
}

.section {
  margin-top: 1.5rem;
}

.section h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: normal;
  font-size: 0.9rem;
  margin: 0.75rem 0;
}

.checkbox input {
  width: auto;
  margin-top: 0.2rem;
}

.links {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.9rem;
}

.auth-logout-link {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

/* ---- IDB Sortiment: keyword search + autosuggest + product grid ---- */
.idb-catalog {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.idb-catalog-toolbar {
  padding-bottom: 1.1rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--brand-border, #e3e8ef);
}

.idb-catalog-filters {
  padding: 1rem 1.1rem;
  margin-bottom: 1.35rem;
  border: 1px solid var(--brand-border, #e3e8ef);
  border-radius: 10px;
  background: #f8fafc;
}

.idb-catalog-results {
  padding-top: .25rem;
}

.idb-catalog-results__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: .35rem;
}

.idb-catalog-results__title {
  margin: 0;
  font-size: 1.15rem;
}

.idb-meili-debug-btn {
  width: 1.85rem;
  height: 1.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--brand-border, #e3e8ef);
  background: #fff;
  border-radius: 8px;
  color: var(--brand-muted, #5c6570);
  cursor: pointer;
  padding: 0;
  font-size: 1.05rem;
  line-height: 1;
}

.idb-meili-debug-btn:hover {
  color: var(--brand-primary, #c8102e);
  border-color: #d7dde6;
  background: #f8fafc;
}

.idb-meili-tabs {
  display: flex;
  gap: .35rem;
  padding: .65rem 1.1rem 0;
  border-bottom: 1px solid var(--brand-border, #e3e8ef);
}

.idb-meili-tabs__btn {
  border: 0;
  background: transparent;
  padding: .55rem .75rem;
  font-size: .86rem;
  color: var(--brand-muted, #5c6570);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.idb-meili-tabs__btn.is-active {
  color: var(--brand-ink, #1b2430);
  border-bottom-color: var(--brand-primary, #c8102e);
  font-weight: 600;
}

.idb-search {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.idb-search__box {
  position: relative;
  flex: 1 1 420px;
  min-width: 260px;
}

.idb-search__icon {
  position: absolute;
  left: .75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brand-muted, #8a94a6);
  pointer-events: none;
}

.idb-search__input {
  padding-left: 2.25rem;
}

.idb-filter-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  flex: 1 1 auto;
  min-width: 0;
}

.idb-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: .75rem 1.25rem;
  margin-top: 0;
}

.idb-facet-selects {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: .55rem .75rem;
  flex: 1 1 100%;
}

.idb-facet-select {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  min-width: 11rem;
  flex: 1 1 11rem;
  max-width: 18rem;
  margin: 0;
}

.idb-facet-select select {
  width: 100%;
  min-height: 2.25rem;
  padding: .35rem .55rem;
  border: 1px solid var(--brand-border, #d5dce6);
  border-radius: 6px;
  background: #fff;
  font-size: .9rem;
}

.idb-facet-chip {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  flex: 0 0 auto;
  margin: 0;
}

.idb-filter-chips__label {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--brand-muted, #5c6570);
  margin-right: .15rem;
}

.idb-chip {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .28rem .7rem;
  border: 1px solid var(--brand-border, #d5dce6);
  border-radius: 999px;
  background: #fff;
  color: #1f2733;
  font-size: .84rem;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}

.idb-chip small {
  font-weight: 500;
  opacity: .8;
}

.idb-chip:hover {
  border-color: color-mix(in srgb, var(--brand-primary, #164196) 45%, #d5dce6);
  background: color-mix(in srgb, var(--brand-primary, #164196) 6%, #fff);
  text-decoration: none;
  color: inherit;
}

.idb-chip.is-active {
  background: var(--brand-primary, #164196);
  border-color: transparent;
  color: #fff;
}

.idb-price-filter {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: .55rem .75rem;
  margin-left: auto;
  min-width: 0;
  max-width: 100%;
}

.idb-price-filter__values {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-weight: 700;
  white-space: nowrap;
  font-size: .9rem;
}

.idb-price-filter__slider {
  position: relative;
  flex: 0 1 220px;
  width: 220px;
  min-width: 140px;
  height: 28px;
}

.idb-catalog-body.is-loading #idb-results {
  opacity: .55;
  pointer-events: none;
  transition: opacity .15s ease;
}

.idb-price-filter__slider input[type="range"] {
  position: absolute;
  left: 0;
  width: 100%;
  pointer-events: none;
  appearance: none;
  background: transparent;
  height: 28px;
  margin: 0;
}

.idb-price-filter__slider input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: #d5dce6;
  border-radius: 999px;
}

.idb-price-filter__slider input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  pointer-events: auto;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--brand-primary, #164196);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(22, 65, 150, .25);
  cursor: pointer;
}

.idb-price-filter__slider input[type="range"]::-moz-range-track {
  height: 4px;
  background: #d5dce6;
  border-radius: 999px;
}

.idb-price-filter__slider input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand-primary, #164196);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(22, 65, 150, .25);
  cursor: pointer;
}

.idb-suggest {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: #fff;
  border: 1px solid var(--brand-border, #e3e6ee);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(20, 30, 60, .12);
  max-height: 22rem;
  overflow-y: auto;
  padding: .25rem;
}

.idb-suggest__item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .4rem .5rem;
  border-radius: 6px;
  cursor: pointer;
}

.idb-suggest__item:hover,
.idb-suggest__item.is-active {
  background: color-mix(in srgb, var(--brand-primary, #2f66f5) 10%, #fff);
}

.idb-suggest__item img,
.idb-suggest__noimg {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 4px;
  background: #f4f5f9;
  flex: 0 0 auto;
}

.idb-suggest__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.idb-suggest__text strong {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.idb-suggest__text small {
  color: var(--brand-muted, #8a94a6);
}

.idb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: .5rem;
}

.idb-card {
  border: 1px solid var(--brand-border, #e3e6ee);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s ease, transform .15s ease;
  width: 100%;
  padding: 0;
  margin: 0;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.idb-card:hover {
  box-shadow: 0 8px 22px rgba(20, 30, 60, .1);
  transform: translateY(-2px);
}

.idb-card:focus-visible {
  outline: 2px solid var(--brand-primary, #164196);
  outline-offset: 2px;
}

.idb-card__media {
  display: flex;
  aspect-ratio: 1 / 1;
  background: #f6f7fb;
  align-items: center;
  justify-content: center;
}

.idb-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.idb-card__noimg {
  color: #c3c8d4;
  font-size: 2rem;
}

.idb-card__body {
  padding: .6rem .7rem .7rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  flex: 1 1 auto;
}

.idb-card__brand {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--brand-muted, #8a94a6);
  font-weight: 600;
}

.idb-card__name {
  font-weight: 600;
  color: inherit;
  text-decoration: none;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.idb-card__meta {
  font-size: .78rem;
  color: var(--brand-muted, #8a94a6);
}

.idb-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-top: auto;
}

.idb-card__price {
  font-weight: 700;
  font-size: 1.02rem;
}

.idb-card__badges {
  display: flex;
  gap: .3rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.idb-card__sku {
  font-size: .72rem;
  color: var(--brand-muted, #8a94a6);
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.idb-card__sku code {
  background: var(--brand-surface-2, #f2f4f8);
  border-radius: 4px;
  padding: .05rem .3rem;
}

/* GH (Großhandel) per-size stock */
.idb-gh {
  margin-top: .6rem;
  padding-top: .55rem;
  border-top: 1px dashed var(--brand-border, #d5dce6);
}

.idb-gh__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .4rem;
}

.idb-gh__title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--brand-muted, #5c6570);
}

.idb-gh__sizes {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
}

.idb-gh__size {
  display: inline-flex;
  align-items: baseline;
  gap: .25rem;
  padding: .12rem .4rem;
  border: 1px solid var(--brand-border, #d5dce6);
  border-radius: 6px;
  background: #ffffff;
  font-size: .74rem;
  line-height: 1.2;
}

.idb-gh__size.is-empty {
  opacity: .45;
}

.idb-gh__size-label {
  font-weight: 600;
  color: #1f2733;
}

.idb-gh__size-stock {
  font-variant-numeric: tabular-nums;
  color: var(--brand-primary, #164196);
  font-weight: 700;
}

.idb-gh__size.is-empty .idb-gh__size-stock {
  color: var(--brand-muted, #8a94a6);
}

/* IDB product detail slide-over (add-to-cart style) */
body.idb-drawer-open {
  overflow: hidden;
}

.idb-drawer {
  position: fixed;
  inset: 0;
  z-index: 1080;
  pointer-events: none;
}

.idb-drawer.is-open {
  pointer-events: auto;
}

.idb-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .42);
  opacity: 0;
  transition: opacity .22s ease;
}

.idb-drawer.is-open .idb-drawer__backdrop {
  opacity: 1;
}

.idb-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 100vw);
  background: #fff;
  box-shadow: -12px 0 40px rgba(15, 23, 42, .18);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .22s ease;
}

.idb-drawer.is-open .idb-drawer__panel {
  transform: translateX(0);
}

.idb-drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem 1rem .85rem;
  border-bottom: 1px solid var(--brand-border, #e3e6ee);
}

.idb-drawer__eyebrow {
  margin: 0 0 .2rem;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--brand-muted, #8a94a6);
  font-weight: 600;
  min-height: 1em;
}

.idb-drawer__title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.3;
  font-weight: 700;
}

.idb-drawer__close {
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--brand-surface-2, #f2f4f8);
  color: #1f2733;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.idb-drawer__close:hover {
  background: #e7ebf3;
}

.idb-drawer__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1rem;
}

.idb-drawer__loading,
.idb-drawer__error {
  padding: 1.25rem .25rem;
}

.idb-drawer__error {
  color: #991b1b;
}

.idb-drawer__hero {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: .85rem;
  margin-bottom: 1.15rem;
}

.idb-drawer__media {
  aspect-ratio: 1 / 1;
  background: #f6f7fb;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.idb-drawer__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.idb-drawer__price {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: .35rem;
}

.idb-drawer__meta {
  font-size: .84rem;
  color: var(--brand-muted, #5c6570);
  margin-bottom: .45rem;
}

.idb-drawer__codes {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-bottom: .55rem;
}

.idb-drawer__codes code {
  background: var(--brand-surface-2, #f2f4f8);
  border-radius: 4px;
  padding: .05rem .3rem;
  font-size: .72rem;
}

.idb-drawer__shop-link {
  font-size: .84rem;
  font-weight: 600;
}

.idb-drawer__sizes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .65rem;
}

.idb-drawer__sizes-head h3 {
  margin: 0;
  font-size: .86rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--brand-muted, #5c6570);
}

.idb-drawer__sizes-list {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.idb-drawer__size {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .65rem .75rem;
  border: 1px solid var(--brand-border, #d5dce6);
  border-radius: 8px;
  background: #fff;
}

.idb-drawer__size.is-empty {
  opacity: .55;
  background: #fafbfc;
}

.idb-drawer__size-name {
  font-weight: 600;
}

.idb-drawer__size-stock {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--brand-primary, #164196);
}

.idb-drawer__size.is-empty .idb-drawer__size-stock {
  color: var(--brand-muted, #8a94a6);
}

.idb-drawer__sizes-empty {
  margin: .35rem 0 0;
}

.idb-drawer__size-main {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 0;
}

.idb-drawer__ean {
  font-size: .75rem;
  color: var(--brand-muted, #8a94a6);
}

.idb-drawer__size-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .35rem;
}

.idb-drawer__ean-check {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .8rem;
  cursor: pointer;
  user-select: none;
}

.idb-drawer__ean-missing {
  font-size: .75rem;
}

.idb-drawer__partner {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #e6eaee;
}

.idb-drawer__field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-bottom: .75rem;
  font-size: .85rem;
}

.idb-drawer__field select,
.idb-drawer__field input {
  width: 100%;
  padding: .55rem .7rem;
  border: 1px solid #cfd6dd;
  border-radius: 8px;
  background: #fff;
}

.idb-drawer__partner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .25rem;
}

.idb-drawer__partner-status {
  margin: .75rem 0 0;
  font-size: .9rem;
}

.idb-drawer__partner-status.is-ok {
  color: #1f7a3f;
}

.idb-drawer__partner-status.is-error {
  color: #b42318;
}

@media (max-width: 480px) {
  .idb-drawer__hero {
    grid-template-columns: 1fr;
  }

  .idb-drawer__media {
    max-width: 180px;
  }
}

/* ---- Vertriebspartner Sortiment: API catalog preview ---- */
.sca-layout {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.sca-layout__main {
  flex: 1 1 67%;
  min-width: 0;
}

.sca-preview {
  flex: 0 0 33%;
  max-width: 33%;
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 !important;
}

.sca-preview__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem 1.1rem .65rem;
  border-bottom: 1px solid var(--brand-border, #e3e8ef);
}

.sca-preview__eyebrow {
  margin: 0;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--brand-muted, #5c6570);
}

.sca-preview__title {
  margin: .15rem 0 0;
  font-size: 1.05rem;
}

.sca-preview__actions {
  display: inline-flex;
  gap: .35rem;
}

.sca-preview__icon-btn {
  width: 2.1rem;
  height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--brand-border, #d5dce6);
  border-radius: 8px;
  background: #fff;
  color: #1f2733;
  cursor: pointer;
}

.sca-preview__icon-btn:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--brand-primary, #164196) 45%, #d5dce6);
  background: color-mix(in srgb, var(--brand-primary, #164196) 6%, #fff);
}

.sca-preview__icon-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.sca-preview__icon-btn i {
  font-size: 1.15rem;
}

.sca-preview__meta {
  margin: 0;
  padding: .55rem 1.1rem;
  font-size: .82rem;
  border-bottom: 1px solid var(--brand-border, #eef1f5);
}

.sca-preview__list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: .65rem 1.1rem 1.1rem;
}

.sca-preview__item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: .7rem;
  padding: .65rem 0;
  border-bottom: 1px solid #eef1f5;
}

.sca-preview__item:last-child {
  border-bottom: 0;
}

.sca-preview__thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f5f7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sca-preview__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sca-preview__noimg {
  color: #9aa3af;
  font-size: 1.25rem;
}

.sca-preview__brand {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--brand-muted, #5c6570);
}

.sca-preview__name {
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.3;
  margin: .15rem 0 .4rem;
}

.sca-preview__prices {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem .9rem;
  font-size: .84rem;
}

.sca-preview__prices small {
  display: block;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--brand-muted, #5c6570);
}

body.sca-debug-open {
  overflow: hidden;
}

.sca-debug {
  position: fixed;
  inset: 0;
  z-index: 90;
}

.sca-debug__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  opacity: 0;
  transition: opacity .18s ease;
}

.sca-debug.is-open .sca-debug__backdrop {
  opacity: 1;
}

.sca-debug__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(520px, 100%);
  height: 100%;
  background: #fff;
  box-shadow: -8px 0 28px rgba(15, 23, 42, .18);
  transform: translateX(100%);
  transition: transform .2s ease;
  display: flex;
  flex-direction: column;
}

.sca-debug.is-open .sca-debug__panel {
  transform: translateX(0);
}

.sca-debug__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--brand-border, #e3e8ef);
}

.sca-debug__header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.sca-debug__close {
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.4rem;
}

.sca-debug__close:hover {
  background: #f1f4f8;
}

.sca-debug__body {
  margin: 0;
  padding: 1rem 1.1rem;
  overflow: auto;
  flex: 1 1 auto;
  font-size: .82rem;
  line-height: 1.45;
  background: #0f172a;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 1100px) {
  .sca-layout {
    flex-direction: column;
  }

  .sca-preview {
    flex: 1 1 auto;
    max-width: 100%;
    width: 100%;
    position: static;
    max-height: 70vh;
  }
}

.order-show-layout {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.order-show-main {
  flex: 1 1 67%;
  min-width: 0;
}

.order-show-main > .card {
  margin-bottom: 1rem;
}

.order-history-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.order-history-card .section {
  margin-bottom: 0.75rem;
}

.order-history-card .section h3 {
  margin: 0;
  font-size: 0.95rem;
}

.order-history-empty {
  margin: 0;
  font-size: 0.9rem;
}

.order-history-table {
  width: 100%;
  margin: 0;
}

.order-line-history {
  margin: 0.35rem 0 0.15rem;
}

.order-line-history .status-timeline {
  margin-top: 0.65rem;
}

.order-meta-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.85rem;
}

.order-meta-card__title,
.order-addresses__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.order-meta-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.order-meta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.75rem 1.1rem;
}

.order-meta__label {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-muted, #5c6570);
}

.order-meta__value {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
}

.order-meta__item--wide {
  grid-column: span 2;
}

.order-meta-labels {
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--brand-border, #d5dce6);
}

.order-meta-labels__row {
  margin-top: 0.25rem;
  font-size: 0.9rem;
}

.order-addresses {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
}

.order-addresses__body {
  display: block;
  margin: 0.45rem 0 0;
  font-style: normal;
  line-height: 1.45;
  font-size: 0.92rem;
}

.order-show-progress {
  flex: 0 0 33%;
  max-width: 22rem;
  position: sticky;
  top: 1rem;
}

.order-progress {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .85rem;
}

.order-progress__step {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: var(--brand-muted, #5c6570);
  font-weight: 600;
}

.order-progress__marker {
  width: .85rem;
  height: .85rem;
  border-radius: 50%;
  border: 2px solid #c5ced9;
  background: #fff;
  flex: 0 0 auto;
}

.order-progress__step.is-done {
  color: #065f46;
}

.order-progress__step.is-done .order-progress__marker {
  background: #10b981;
  border-color: #10b981;
}

.order-progress__step.is-current {
  color: var(--brand-primary, #164196);
}

.order-progress__step.is-current .order-progress__marker {
  border-color: var(--brand-primary, #164196);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary, #164196) 20%, transparent);
}

.order-label-modal {
  border: 1px solid var(--brand-border, #d5dce6);
  border-radius: 10px;
  padding: 1.25rem 1.4rem;
  max-width: 32rem;
  width: calc(100% - 2rem);
}

.order-line-actions {
  min-width: 11rem;
  vertical-align: top;
}

.order-line-actions__primary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.order-line-actions__more {
  margin-top: 0.45rem;
}

.order-line-actions__more summary {
  cursor: pointer;
  font-size: 0.8rem;
}

.order-line-actions .btn-sm {
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
}

.order-label-modal::backdrop {
  background: rgba(15, 23, 42, .45);
}

.order-mail-preview {
  display: block;
  width: 100%;
  min-height: 28rem;
  border: 1px solid var(--brand-border, #d5dce6);
  border-radius: 8px;
  background: #fff;
}

.order-mail-text {
  margin: 0;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.45;
}

.badge-sent { background: #d1fae5; color: #065f46; }
.badge-skipped { background: #f3f4f6; color: #6b7280; }
.badge-dead_letter { background: #fee2e2; color: #991b1b; }

.badge-shipment_created {
  background: #dbeafe;
  color: #1e40af;
}

@media (max-width: 960px) {
  .order-show-layout {
    flex-direction: column;
  }

  .order-show-progress {
    flex: 1 1 auto;
    max-width: none;
    width: 100%;
    position: static;
  }

  .order-addresses {
    grid-template-columns: 1fr;
  }

  .order-meta__item--wide {
    grid-column: span 1;
  }
}

