.shell {
  max-width: 1580px;
  padding: 26px 30px 36px;
}

.topbar {
  margin: -26px -30px 18px;
  padding: 12px 30px;
  min-height: 74px;
}

.command-bar {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(480px, 1.35fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 18px;
  padding: 20px 22px;
}

.command-copy h2 {
  margin-bottom: 6px;
  font-size: 28px;
  line-height: 1.05;
}

.command-copy .muted {
  margin-bottom: 0;
  max-width: 680px;
  font-size: 13px;
  line-height: 1.45;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(440px, 1.65fr) minmax(330px, 1.05fr);
  gap: 18px;
  align-items: start;
}

.workbench > .panel {
  min-width: 0;
}

.workflow-panel,
.product-panel,
.content-panel {
  padding: 20px;
}

.workflow-panel h3,
.product-panel h3,
.content-panel h3 {
  margin-bottom: 14px;
}

.segmented-vertical {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.segmented-vertical .segment {
  width: 100%;
  padding: 11px 12px;
  text-align: left;
}

.workflow-divider {
  height: 1px;
  margin: 20px 0;
  background: #eceeef;
}

.pipeline {
  display: grid;
  gap: 5px;
}

.pipeline-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 8px 0;
}

.pipeline-row > div {
  display: grid;
  gap: 2px;
}

.pipeline-row strong {
  font-size: 13px;
}

.pipeline-row small {
  overflow: hidden;
  color: #737b81;
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
}

.pipeline-dot {
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: #c8cdd1;
}

.ok-dot {
  background: #55a85a;
}

.muted-row {
  opacity: .7;
}

.product-panel {
  min-height: 420px;
}

.product-card {
  grid-template-columns: minmax(110px, .75fr) minmax(180px, 1.6fr) minmax(100px, .7fr);
  gap: 12px;
  padding: 15px;
}

.product-card strong {
  overflow-wrap: anywhere;
}

.product-context {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #e3e6e8;
  border-radius: 12px;
  background: #fafbfb;
}

.product-context-head,
.context-section-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}

.product-context-head strong,
.context-section-head strong {
  font-size: 13px;
}

.product-context-head > small,
.context-section-head > small {
  padding-top: 2px;
  text-align: right;
  font-size: 11px;
}

.product-context-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.product-context-grid > div,
.inventory-grid > div {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #eceeef;
  border-radius: 10px;
  background: #fff;
}

.product-context-grid p,
.inventory-grid p,
.price-card p {
  margin-bottom: 4px;
  font-size: 11px;
}

.product-context-grid strong,
.inventory-grid strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.35;
}

.product-context-grid small,
.inventory-grid small {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 10px;
  line-height: 1.3;
}

.context-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e6e8ea;
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.price-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e6e8ea;
  border-radius: 10px;
  background: #fff;
}

.price-card strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 18px;
  line-height: 1.15;
}

.price-card small {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 10px;
  line-height: 1.3;
}

.price-card .price-source {
  margin-top: 7px;
  color: #8a9196;
}

.ssc-price-card {
  border-color: #f2b183;
  background: #fffaf6;
}

.price-match-ok {
  color: #33853a;
  font-weight: 700;
}

.price-match-warning {
  color: #b56616;
  font-weight: 700;
}

.price-match-error {
  color: #b13838;
  font-weight: 700;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 9px;
}

.ssc-result {
  gap: 10px;
  margin-top: 12px;
}

.compact-result {
  padding: 13px 14px;
}

.compatibility-list {
  display: block;
  font-size: 13px;
  line-height: 1.45;
}

.technical-data {
  padding: 13px 14px;
}

.content-panel .panel-head {
  align-items: center;
}

.compact-button {
  padding: 9px 12px;
  font-size: 12px;
}

.content-stack {
  display: grid;
  gap: 13px;
}

.content-stack label,
.content-stack .featured-field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
}

.field-label {
  font-size: 12px;
  font-weight: 800;
}

.content-stack textarea {
  min-height: 84px;
  margin-top: 0;
  padding: 10px 11px;
  font-size: 13px;
  line-height: 1.4;
}

.compatibility-output-wrap {
  position: relative;
}

.content-stack .featured-field textarea {
  min-height: 122px;
  padding-right: 48px;
  border-color: #f2b183;
  background: #fffaf6;
}

.copy-icon-button {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 1px solid #e1e4e7;
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
  color: #555d63;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.copy-icon-button:disabled {
  opacity: .35;
}

.copy-icon-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.actual-save-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.actual-save-row button {
  flex: 0 0 auto;
  padding: 9px 12px;
  font-size: 12px;
}

.actual-save-state {
  min-width: 0;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 500;
}

.manual-compatibility {
  margin-top: 2px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fafbfb;
  font-weight: 400;
}

.manual-compatibility summary {
  padding: 10px 12px;
  cursor: pointer;
  color: #4e565c;
  font-size: 12px;
  font-weight: 700;
  user-select: none;
}

.manual-compatibility[open] summary {
  border-bottom: 1px solid #e8eaec;
}

.manual-compatibility-body {
  display: grid;
  gap: 8px;
  padding: 11px 12px 12px;
}

.content-stack .manual-compatibility-body label {
  display: block;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
}

.manual-compatibility-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.manual-compatibility-row input {
  width: 100%;
  padding: 10px 11px;
  text-transform: uppercase;
  font-size: 12px;
}

.manual-compatibility-row button {
  padding: 10px 13px;
  font-size: 12px;
}

.manual-compatibility-body small {
  color: #7a8187;
  font-size: 10px;
  line-height: 1.35;
  font-weight: 400;
}

.content-stack .long-description {
  min-height: 145px;
}

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

@media (max-width: 1180px) {
  .workbench {
    grid-template-columns: minmax(0, 1fr);
  }

  .content-panel {
    grid-column: 1 / -1;
  }

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

  .content-stack .featured-field,
  .content-stack label:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .shell {
    padding: 18px;
  }

  .topbar {
    margin: -18px -18px 16px;
    padding: 14px 18px;
  }

  .command-bar,
  .workbench,
  .content-stack,
  .product-context-grid,
  .price-grid,
  .inventory-grid {
    grid-template-columns: 1fr;
  }

  .command-bar {
    gap: 18px;
  }

  .content-panel,
  .content-stack .featured-field,
  .content-stack label:last-child {
    grid-column: auto;
  }

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

  .segmented-vertical .segment {
    text-align: center;
  }

  .manual-compatibility-row {
    grid-template-columns: 1fr;
  }

  .actual-save-row {
    align-items: stretch;
    flex-direction: column;
  }
}


/* --- UI hierarchia + információs súgók --- */
.command-bar {
  display: block;
  padding: 18px 22px;
}

.command-heading {
  margin-bottom: 14px;
}

.command-heading h2 {
  margin: 0;
  font-size: 27px;
  line-height: 1.08;
}

.command-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
}

.profile-inline {
  display: grid;
  gap: 6px;
  min-width: 330px;
  padding: 8px 10px;
  border: 1px solid #eceeef;
  border-radius: 10px;
  background: #fafbfb;
}

.profile-label {
  color: #737b81;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.profile-selector {
  display: flex;
  gap: 4px;
}

.profile-selector .segment {
  min-width: 0;
  padding: 7px 10px;
  font-size: 11px;
  white-space: nowrap;
}

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

.product-panel {
  grid-column: 1 / -1;
  order: 1;
  min-height: 0;
}

.content-panel {
  order: 2;
}

.product-head-status {
  display: flex;
  gap: 8px;
  align-items: center;
}

.result-state {
  color: #70777d;
  font-size: 11px;
  font-weight: 700;
}

.priority-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  background: transparent;
  border: 0;
}

.priority-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e7e9eb;
  border-radius: 12px;
  background: #fff;
}

.priority-card-head {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
}

.priority-card-head p {
  margin: 0 0 6px;
}

.priority-card > strong {
  display: block;
  overflow-wrap: anywhere;
}

.priority-card > small {
  display: block;
  margin-top: 5px;
}


.importance-10 {
  grid-column: span 6;
  padding: 17px;
  border-color: #f3b27e;
  background: #fffaf6;
}

.importance-10 > strong {
  font-size: 19px;
  line-height: 1.22;
}


.importance-8 {
  grid-column: span 4;
}

.importance-8 > strong {
  font-size: 16px;
  line-height: 1.25;
}

.importance-6 {
  grid-column: span 4;
  background: #fbfbfc;
}

.importance-6 > strong {
  font-size: 14px;
  line-height: 1.3;
}

.product-context-secondary-grid {
  grid-template-columns: minmax(240px, 1fr);
}

.label-with-info {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  width: fit-content;
  max-width: 100%;
}

.info-tip {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-family: Georgia, serif;
  font-size: 11px;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  vertical-align: middle;
  box-shadow: none;
}

.info-tip.is-open {
  background: #f36f21;
  filter: none;
  outline: none;
}

.info-tip::after {
  position: absolute;
  z-index: 100;
  left: 50%;
  bottom: calc(100% + 9px);
  width: max-content;
  max-width: min(320px, 75vw);
  padding: 8px 10px;
  border-radius: 8px;
  background: #171a1d;
  color: #fff;
  content: attr(data-tooltip);
  font-family: inherit;
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity .14s ease, transform .14s ease;
}

.info-tip::before {
  position: absolute;
  z-index: 101;
  left: 50%;
  bottom: calc(100% + 4px);
  width: 0;
  height: 0;
  border: 5px solid transparent;
  border-top-color: #171a1d;
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
}

.info-tip.is-open::after,
.info-tip.is-open::before {
  opacity: 1;
}

.info-tip.is-open::after {
  transform: translate(-50%, 0);
}

.field-label-row {
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 900px) {
  .command-actions {
    grid-template-columns: 1fr;
  }

  .profile-inline {
    min-width: 0;
  }

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

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

  .product-panel,
  .workflow-panel,
  .content-panel {
    grid-column: auto;
  }

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

  .importance-10,
  .importance-8,
  .importance-6 {
    grid-column: auto;
  }
}


/* --- Termékadat tisztítás, árhierarchia és készletkártya --- */
.identifier-card .identifier-barcode {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(243, 111, 33, .18);
}

.identifier-barcode span {
  color: #7b8287;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.identifier-barcode strong {
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.25;
}

.product-context {
  padding-top: 12px;
}

.product-context-secondary-grid {
  margin-top: 0;
}

.price-grid-ranked {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
}

.price-card-head {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
}

.price-card-head p {
  margin: 0 0 6px;
}

.price-importance-10 {
  border-color: #f3a46e;
  background: #fff8f2;
}

.price-importance-10 > strong {
  font-size: 22px;
}


.price-importance-8 > strong {
  font-size: 20px;
}


.price-importance-7 > strong {
  font-size: 18px;
}


.stock-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-color: #dfe3e6;
  background: #f8f9f9;
}

.stock-quantity {
  display: block;
  font-size: 26px !important;
  line-height: 1.05 !important;
}

.storage-inline {
  display: grid;
  gap: 2px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #e4e7e9;
}

.storage-inline span {
  color: #80878c;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.storage-inline strong {
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

@media (max-width: 1280px) {
  .price-grid-ranked {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .price-grid-ranked {
    grid-template-columns: 1fr;
  }

  .identifier-card .identifier-barcode {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}


/* --- MSSQL név szerinti aktív kereső --- */
.lookup-input-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.lookup-input-wrap > input {
  width: 100%;
}

.product-suggestions {
  position: absolute;
  z-index: 220;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  overflow: hidden;
  max-height: 420px;
  border: 1px solid #dfe3e6;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(20, 24, 28, .16);
}

.product-suggestion {
  display: grid;
  width: 100%;
  gap: 3px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #eef0f1;
  border-radius: 0;
  background: #fff;
  color: #15191c;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
}

.product-suggestion:last-child {
  border-bottom: 0;
}

 .product-suggestion.is-active {
  background: #fff7f1;
  color: #15191c;
  filter: none;
}

.product-suggestion-primary {
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-suggestion-secondary {
  overflow: hidden;
  color: #687077;
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-suggestion-meta {
  color: #8a9196;
  font-size: 10px;
  line-height: 1.25;
}

.product-suggestion-empty,
.product-suggestion-loading {
  padding: 11px 12px;
  color: #757d83;
  font-size: 11px;
}

@media (max-width: 900px) {
  .lookup-input-wrap {
    width: 100%;
  }

  .product-suggestions {
    max-height: 55vh;
  }
}

/* Alkatrészfotók: a feldolgozott és nyers fájlok külön állapotot kapnak. */
.photo-panel {
  margin: 18px 0;
  padding: 16px;
  border: 2px solid #d6dce0;
  border-radius: 14px;
  background: #f8fafb;
}
.photo-panel.photo-processed { border-color: #2e9b59; background: #f1fbf4; }
.photo-panel.photo-raw { border-color: #ed8b21; background: #fff7ed; }
.photo-panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.photo-panel-heading .section-kicker { margin-bottom: 4px; }
.photo-panel.photo-processed .photo-panel-heading strong { color: #186139; }
.photo-panel.photo-raw .photo-panel-heading strong { color: #a34e0a; }
.photo-count { color: #58626b; font-size: 12px; white-space: nowrap; }
.photo-message { margin: 8px 0 12px; color: #4b555d; font-size: 12px; line-height: 1.45; }
.photo-thumbnails { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.photo-thumbnail {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 6px;
  border: 1px solid #d9dfe3;
  border-radius: 9px;
  background: #fff;
  color: #24292d;
  text-align: left;
  cursor: pointer;
}
.photo-thumbnail:focus-visible { border-color: #f36f21; outline: 2px solid #f36f21; outline-offset: 1px; }
.photo-thumbnail img, .photo-thumbnail-fallback {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 5px;
  object-fit: contain;
  background: #f1f3f4;
}
.photo-thumbnail-fallback { display: grid; place-items: center; padding: 8px; color: #58626b; font-size: 11px; }
.photo-thumbnail span:last-child { overflow: hidden; font-size: 10px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.photo-viewer { width: min(96vw, 1100px); max-width: none; max-height: 95vh; padding: 0; border: 0; border-radius: 16px; background: #202427; color: #fff; }
.photo-viewer::backdrop { background: rgba(0, 0, 0, .78); }
.photo-viewer-shell { padding: 14px; }
.photo-viewer-header, .photo-viewer-caption { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.photo-viewer-header button { padding: 2px 10px; border: 0; background: transparent; color: #fff; font-size: 32px; cursor: pointer; }
.photo-viewer-stage { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; gap: 8px; margin: 10px 0; }
.photo-viewer-stage > button { border: 0; background: #41484e; color: #fff; border-radius: 10px; font-size: 38px; cursor: pointer; }
.photo-viewer-stage > button:disabled { opacity: .25; cursor: default; }
.photo-viewer-image { display: grid; min-height: 180px; place-items: center; overflow: hidden; }
.photo-viewer-image img { display: block; max-width: 100%; max-height: 75vh; object-fit: contain; transform-origin: center; touch-action: none; }
.photo-viewer-caption { color: #d7dde1; font-size: 12px; overflow-wrap: anywhere; flex-wrap: wrap; }
@media (max-width: 600px) {
  .photo-viewer-stage { grid-template-columns: 32px minmax(0, 1fr) 32px; gap: 3px; }
  .photo-viewer-stage > button { font-size: 28px; }
}

.photo-thumbnail-fallback.hidden, .photo-viewer-image img.hidden { display: none; }

/* A kereső közös; a termékadatok és az ellenőrzőlista külön füleken láthatók. */
.workspace-tabs { display: flex; gap: 6px; margin: 0 0 16px; border-bottom: 1px solid #dfe4e8; }
.workspace-tab { padding: 11px 18px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #48545b; font-weight: 700; cursor: pointer; }
.workspace-tab.active { border-bottom-color: #e25c20; color: #9e3c12; }
.workspace-tab:focus-visible { outline: 2px solid #e25c20; outline-offset: -2px; }
.workbench.hidden, .shop-checklist.hidden, .knowledge-workspace.hidden, .settings-workspace.hidden { display: none; }
.shop-checklist { padding: 24px; }
.shop-checklist-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.shop-checklist-header h2 { margin: 2px 0 8px; }
.shop-checklist-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.shop-check-filter { padding: 8px 14px; border: 1px solid #d5dce1; border-radius: 4px; background: #f5f7f8; color: #36434b; font-size: 12px; }
.shop-check-filter.active { border-color: #c85a20; background: #fff1e9; color: #8b390f; }
.shop-check-filter:focus-visible, .shop-check-toggle:focus-visible { outline: 3px solid #e25c20; outline-offset: 2px; }
.shop-checklist-items { display: flex; flex-direction: column; gap: 12px; max-width: 680px; margin-top: 18px; }
.shop-check { min-width: 0; border: 2px solid #d5dce1; border-radius: 16px; background: #f8fafb; overflow: hidden; }
.shop-check[hidden] { display: none; }
.shop-check.pass { border-color: #39945c; background: #f5fff8; }
.shop-check.fail { border-color: #dc812f; background: #fff9f2; }
.shop-check.unknown { border-color: #a5adb4; background: #f5f6f7; }
.shop-check-toggle { display: flex; width: 100%; min-height: 64px; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 20px; border: 0; border-radius: 0; background: transparent; color: #172129; text-align: left; }
.shop-check-toggle strong { min-width: 0; overflow-wrap: anywhere; font-size: 18px; line-height: 1.25; }
.shop-check-status { flex-shrink: 0; font-weight: 700; font-size: 14px; text-align: right; white-space: nowrap; }
.shop-check.pass .shop-check-status { color: #176c3c; }
.shop-check.fail .shop-check-status { color: #9b4616; }
.shop-check.unknown .shop-check-status { color: #4a535a; }
.shop-check-details { padding: 12px 20px 16px; border-top: 1px solid rgba(30, 40, 45, .14); background: #fff; }
.shop-check-details p { margin: 0 0 10px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.shop-check-details p:last-child { margin-bottom: 0; }
.shop-check-detail { font-weight: 600; white-space: pre-line; }
.shop-check-files { margin: 8px 0 0; padding-left: 19px; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.shop-check-empty { margin: 18px 0 0; color: #66727a; font-size: 13px; }
@media (max-width: 600px) {
  .workspace-tabs { overflow-x: auto; }
  .workspace-tab { white-space: nowrap; }
  .shop-checklist { padding: 16px; }
  .shop-check-toggle { padding: 12px 14px; }
  .shop-check-details { padding: 12px 14px 16px; }
  .shop-check-toggle strong { font-size: 16px; }
}


/* Saját tudás */
.knowledge-workspace { padding: 24px; }
.knowledge-header h2 { margin: 2px 0 8px; }
.knowledge-header .muted { max-width: 900px; line-height: 1.5; }
.knowledge-layout { display: grid; grid-template-columns: minmax(320px, .9fr) minmax(420px, 1.1fr); gap: 20px; margin-top: 20px; align-items: start; }
.knowledge-editor, .knowledge-browser { min-width: 0; padding: 18px; border: 1px solid #dfe4e8; border-radius: 14px; background: #f8fafb; }
.knowledge-editor form, .knowledge-search-form { display: flex; flex-direction: column; gap: 10px; }
.knowledge-editor textarea { width: 100%; min-height: 150px; resize: vertical; }
.knowledge-form-row { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.knowledge-form-row label { display: flex; flex-direction: column; gap: 6px; color: #4b555d; font-size: 12px; }
.knowledge-form-row select { min-width: 140px; padding: 9px 10px; border: 1px solid #cfd6db; border-radius: 8px; background: #fff; }
.knowledge-state { margin: 2px 0 0; font-size: 12px; }
.knowledge-state.ok { color: #176c3c; }
.knowledge-state.error { color: #a13f23; }
.knowledge-search-form .input-row { width: 100%; }
.knowledge-search-form input { min-width: 0; flex: 1; }
.knowledge-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.knowledge-entry { padding: 14px 16px; border: 1px solid #d9dfe3; border-radius: 11px; background: #fff; }
.knowledge-entry-text { margin: 0; color: #182026; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.knowledge-entry-meta { margin-top: 8px; color: #6a747b; font-size: 11px; }
.knowledge-empty { margin: 0; padding: 16px; color: #66727a; text-align: center; }
@media (max-width: 900px) {
  .knowledge-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .knowledge-workspace { padding: 16px; }
  .knowledge-editor, .knowledge-browser { padding: 14px; }
  .knowledge-form-row { align-items: stretch; flex-direction: column; }
  .knowledge-form-row select { width: 100%; }
}


/* Saját tudás: entitások és szerkesztés */
.knowledge-recognized {
  display: flex;
  min-height: 24px;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.knowledge-recognized:empty { min-height: 0; }
.knowledge-recognized-label {
  color: #657078;
  font-size: 11px;
  font-weight: 700;
}
.knowledge-entity-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid #f0b58f;
  border-radius: 4px;
  background: #fff5ee;
  color: #8d3b14;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}
.knowledge-entry-entities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}
.knowledge-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid #edf0f2;
}
.knowledge-action-button {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 11px;
}
.knowledge-delete-button {
  border-color: #e3b9b4 !important;
  color: #9b3024 !important;
}
.knowledge-entry.editing {
  border-color: #ef9b66;
  background: #fffaf6;
}
.knowledge-edit-text {
  width: 100%;
  min-height: 110px;
  resize: vertical;
}
.knowledge-edit-settings {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}
.knowledge-edit-settings label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #657078;
  font-size: 11px;
  font-weight: 700;
}
.knowledge-edit-visibility {
  min-width: 130px;
  padding: 8px 10px;
  border: 1px solid #cfd6db;
  border-radius: 8px;
  background: #fff;
}


/* Beállítások */
.settings-workspace { padding: 24px; }
.settings-header h2 { margin: 2px 0 8px; }
.settings-header .muted { max-width: 980px; line-height: 1.5; }
.settings-block { margin-top: 22px; padding-top: 20px; border-top: 1px solid #e2e6e9; }
.settings-block:first-of-type { margin-top: 18px; }
.settings-block-head { margin-bottom: 14px; }
.settings-block-head h3 { margin: 2px 0 6px; }
.settings-block-head .muted { margin: 0; }

.settings-note {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-left: 3px solid #e77a35;
  background: #fff8f3;
  color: #59636a;
  font-size: 12px;
  line-height: 1.45;
}

.settings-runtime {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.settings-runtime-group {
  overflow: hidden;
  border: 1px solid #dce2e6;
  border-radius: 12px;
  background: #fff;
}
.settings-runtime-group h3 {
  margin: 0;
  padding: 11px 14px;
  border-bottom: 1px solid #e7eaed;
  background: #f7f9fa;
  font-size: 14px;
}
.settings-runtime-grid {
  display: flex;
  flex-direction: column;
}
.settings-runtime-item {
  display: grid;
  grid-template-columns: minmax(180px, .9fr) minmax(220px, 1.4fr) minmax(140px, .8fr);
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #eef1f3;
}
.settings-runtime-item:last-child { border-bottom: 0; }
.settings-runtime-label {
  color: #58626a;
  font-size: 12px;
  font-weight: 700;
}
.settings-runtime-value {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #172129;
  font-size: 12px;
}
.settings-runtime-value.configured { color: #176c3c; }
.settings-runtime-value.missing { color: #a34e0a; }
.settings-runtime-item code {
  color: #7a838a;
  font-size: 10px;
  overflow-wrap: anywhere;
}

.settings-source-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, .45fr);
  gap: 12px;
  padding: 16px;
  border: 1px solid #dce2e6;
  border-radius: 12px;
  background: #f8fafb;
}
.settings-source-form > label,
.settings-source-options > label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}
.settings-source-form label > span,
.settings-source-options label > span {
  color: #566169;
  font-size: 11px;
  font-weight: 800;
}
.settings-source-form input,
.settings-source-form select,
.settings-source-form textarea {
  width: 100%;
}
.settings-source-location-field,
.settings-source-purpose-field {
  grid-column: 1 / -1;
}
.settings-source-purpose-field textarea { resize: vertical; }
.settings-source-options {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 160px 180px auto;
  gap: 12px;
  align-items: end;
}
.settings-checkbox {
  display: flex !important;
  min-height: 40px;
  flex-direction: row !important;
  gap: 8px !important;
  align-items: center;
}
.settings-checkbox input {
  width: auto;
  margin: 0;
}
.settings-source-form-actions {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 8px;
}
.settings-state {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12px;
}
.settings-state.ok { color: #176c3c; }
.settings-state.error { color: #a13f23; }

.settings-source-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
.settings-source-card {
  padding: 14px 16px;
  border: 1px solid #d9dfe3;
  border-radius: 11px;
  background: #fff;
}
.settings-source-card.inactive { opacity: .62; }
.settings-source-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}
.settings-source-head > div {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.settings-source-type,
.settings-source-priority {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 4px;
  background: #f0f3f5;
  color: #59636a;
  font-size: 10px;
  font-weight: 700;
}
.settings-source-location {
  margin-top: 8px;
  color: #20282e;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.settings-source-purpose {
  margin: 8px 0 0;
  color: #4f5960;
  font-size: 12px;
  line-height: 1.45;
}
.settings-source-meta {
  margin-top: 8px;
  color: #7a8389;
  font-size: 10px;
}
.settings-source-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eef1f3;
}
.settings-source-action {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 11px;
}
.settings-source-delete {
  border-color: #e3b9b4 !important;
  color: #9b3024 !important;
}
.settings-empty {
  margin: 0;
  padding: 14px;
  border: 1px dashed #cfd6db;
  border-radius: 10px;
  color: #68727a;
  text-align: center;
  font-size: 12px;
}

@media (max-width: 900px) {
  .settings-runtime-item {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .settings-source-form {
    grid-template-columns: 1fr;
  }
  .settings-source-location-field,
  .settings-source-purpose-field,
  .settings-source-options,
  .settings-source-form-actions,
  .settings-state {
    grid-column: 1;
  }
  .settings-source-options {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .settings-workspace { padding: 16px; }
  .settings-source-head { flex-direction: column; }
}


/* --- Egységes, mozaikmentes WSA elrendezés --- */
.workbench {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-panel,
.workflow-panel,
.content-panel {
  width: 100%;
  order: initial;
}

.product-panel { order: 1; }
.workflow-panel { order: 2; }
.content-panel { order: 3; }

/* Termékadatok: kártyák helyett soros lista */
.priority-grid,
.price-grid,
.price-grid-ranked,
.product-context-grid,
.product-context-secondary-grid,
.content-stack,
.knowledge-layout,
.settings-source-form,
.settings-source-options {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.priority-card,
.price-card,
.stock-card {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-bottom: 1px solid #e7eaed;
  border-radius: 0;
  background: transparent;
}

.priority-card:first-child,
.price-card:first-child {
  border-top: 1px solid #e7eaed;
}

.priority-card-head,
.price-card-head {
  display: block;
  margin: 0;
}

.priority-card-head p,
.price-card-head p {
  margin: 0;
}

.priority-card > strong,
.price-card > strong,
.stock-card > strong {
  margin: 0;
  font-size: 14px !important;
  line-height: 1.35 !important;
}

.importance-10,
.importance-8,
.importance-6,
.price-importance-10,
.price-importance-8,
.price-importance-7,
.stock-card {
  grid-column: auto;
  padding: 11px 14px;
  border-color: #e7eaed;
  background: transparent;
}

.identifier-card {
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
}

.identifier-card .identifier-barcode {
  grid-column: 2;
  display: grid;
  grid-template-columns: minmax(100px, 140px) minmax(0, 1fr);
  gap: 10px;
  margin: 6px 0 0;
  padding: 7px 0 0;
  border-top: 1px solid #eef1f3;
}

.storage-inline {
  grid-column: 2;
  display: grid;
  grid-template-columns: minmax(100px, 140px) minmax(0, 1fr);
  gap: 10px;
  margin: 6px 0 0;
  padding: 7px 0 0;
  border-top: 1px solid #eef1f3;
}

/* Webshop tartalom: minden mező egymás alatt */
.content-stack {
  gap: 14px;
}

.content-stack > *,
.content-stack .featured-field,
.content-stack label:last-child {
  grid-column: auto;
  width: 100%;
}

/* Saját tudás: szerkesztő, majd keresés/lista */
.knowledge-layout {
  gap: 16px;
}

.knowledge-editor,
.knowledge-browser {
  width: 100%;
}

/* Beállítások: semmi kétoszlopos űrlap */
.settings-source-form {
  gap: 12px;
}

.settings-source-form > label,
.settings-source-location-field,
.settings-source-purpose-field,
.settings-source-options,
.settings-source-form-actions,
.settings-state {
  width: 100%;
  grid-column: auto;
}

.settings-source-options {
  gap: 12px;
}

.settings-runtime-item {
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
}

.settings-runtime-item code {
  grid-column: 2;
}

/* A forráslista marad valódi függőleges lista */
.settings-source-list,
.knowledge-list,
.shop-checklist-items {
  display: flex;
  flex-direction: column;
}

.settings-source-card,
.knowledge-entry,
.shop-check {
  width: 100%;
}

/* Kisebb képernyőn a címke is az érték fölé kerül */
@media (max-width: 760px) {
  .priority-card,
  .price-card,
  .stock-card,
  .identifier-card,
  .settings-runtime-item {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .identifier-card .identifier-barcode,
  .storage-inline,
  .settings-runtime-item code {
    grid-column: 1;
  }

  .identifier-card .identifier-barcode,
  .storage-inline {
    grid-template-columns: 1fr;
  }
}


/* --- Találat: adattábla + fotóoszlop --- */
.product-summary-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1.25fr) minmax(300px, .82fr) minmax(300px, 360px);
  gap: 18px;
  align-items: start;
}

.product-result-table {
  min-width: 0;
}

.product-result-table .priority-card {
  grid-template-columns: minmax(180px, 230px) minmax(0, 1fr);
}

.product-result-table .priority-card:first-child {
  border-top: 1px solid #e7eaed;
}

.product-result-table .priority-card > strong {
  font-size: 14px !important;
  font-weight: 800;
}

/* Fotóböngésző: egy nagy kép, alatta csak a további képek */
.product-photo-browser {
  width: 100%;
  margin: 0;
  padding: 14px;
  border: 1px solid #dce2e6;
  border-radius: 12px;
  background: #f8fafb;
}

.product-photo-browser .photo-message {
  margin: 6px 0 10px;
}

.photo-featured {
  display: grid;
  width: 100%;
  min-height: 260px;
  max-height: 340px;
  padding: 8px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d8dee2;
  border-radius: 10px;
  background: #fff;
  color: #30383e;
  cursor: zoom-in;
}

.photo-featured:focus-visible {
  border-color: #e25c20;
  outline: 2px solid #e25c20;
  outline-offset: 1px;
}

.photo-featured img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 320px;
  object-fit: contain;
}

.photo-featured-fallback {
  color: #6a747b;
  font-size: 12px;
}

.product-photo-browser .photo-thumbnails {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding: 2px 2px 5px;
}

.product-photo-browser .photo-thumbnail {
  display: grid;
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  padding: 4px;
  place-items: center;
  border: 1px solid #d9dfe3;
  border-radius: 8px;
  background: #fff;
}

.product-photo-browser .photo-thumbnail img,
.product-photo-browser .photo-thumbnail-fallback {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 5px;
  object-fit: contain;
}

.product-photo-browser .photo-thumbnail-fallback {
  display: grid;
  padding: 3px;
  place-items: center;
  color: #68727a;
  font-size: 9px;
  line-height: 1.1;
  text-align: center;
}

@media (max-width: 1180px) {
  .product-summary-layout {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  }

  .product-middle-column {
    grid-column: 1;
  }

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

@media (max-width: 820px) {
  .product-summary-layout {
    grid-template-columns: 1fr;
  }

  .product-middle-column,
  .product-photo-browser {
    grid-column: 1;
    grid-row: auto;
  }

  .product-photo-browser {
    max-width: 520px;
  }
}

@media (max-width: 760px) {
  .product-result-table .priority-card {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .photo-featured {
    min-height: 220px;
  }
}


/* Fotóböngésző rejtett állapotai */
.photo-featured.hidden,
.photo-featured img.hidden,
.photo-featured-fallback.hidden,
.product-photo-browser .photo-thumbnail-fallback.hidden {
  display: none;
}


/* --- Termék fejléc és másolható azonosítók --- */
.product-title-heading {
  margin: 0 0 18px;
  font-family: "STIHLDisplayTitling", "STIHLText", Arial, sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .35px;
}

.copy-value {
  display: inline-flex;
  min-width: 0;
  gap: 7px;
  align-items: center;
  justify-content: flex-start;
}

.copy-value strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.copy-value-button {
  display: inline-grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 5px;
  place-items: center;
  border: 1px solid #d9dfe3;
  border-radius: 7px;
  background: #fff;
  color: #59636a;
  box-shadow: none;
}

.copy-value-button:focus-visible {
  border-color: #e25c20;
  background: #fff7f1;
  color: #b94714;
  filter: none;
  outline: none;
}

.copy-value-button.copied {
  border-color: #39945c;
  color: #176c3c;
}

.copy-value-button svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.settings-display-field {
  display: grid;
  max-width: 620px;
  grid-template-columns: minmax(180px, 240px) minmax(220px, 1fr);
  gap: 12px;
  align-items: center;
}

.settings-display-field > span {
  color: #58626a;
  font-size: 12px;
  font-weight: 700;
}

.settings-display-field select {
  width: 100%;
}

.settings-display-block .settings-state {
  margin: 8px 0 0;
}

@media (max-width: 760px) {
  .settings-display-field {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}


/* --- Termékadat középső hasáb: árak és készlet --- */
.product-middle-column {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dce2e6;
  border-radius: 12px;
  background: #fff;
}

.product-middle-heading {
  padding: 13px 14px 5px;
  border-bottom: 1px solid #e7eaed;
  background: #f8fafb;
}

.product-middle-heading .section-kicker {
  margin-bottom: 7px;
}

.product-middle-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.product-middle-list .price-card,
.product-middle-list .stock-card {
  display: grid;
  grid-template-columns: minmax(118px, 1fr) minmax(120px, auto);
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 64px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid #eef1f3;
  border-radius: 0;
  background: transparent;
}

.product-middle-list .price-card:last-child,
.product-middle-list .stock-card:last-child {
  border-bottom: 0;
}

.product-middle-list .price-card-head,
.product-middle-list .price-card-head p {
  margin: 0;
}

.product-middle-list .price-value {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
}

.product-middle-list .price-value > strong {
  font-size: 16px !important;
  font-weight: 800;
  line-height: 1.2 !important;
  white-space: nowrap;
}

.product-middle-list .price-value > small {
  font-size: 10px;
  white-space: nowrap;
}

.product-middle-list .stock-card {
  align-items: start;
  padding-top: 12px;
  padding-bottom: 12px;
}

.product-middle-list .stock-value {
  min-width: 0;
}

.product-middle-list .stock-quantity {
  display: block;
  margin: 0;
  font-size: 20px !important;
  line-height: 1.1 !important;
  text-align: right;
}

.product-middle-list .storage-inline {
  display: flex;
  grid-column: auto;
  justify-content: flex-end;
  gap: 7px;
  margin: 7px 0 0;
  padding: 7px 0 0;
  border-top: 1px solid #eef1f3;
  text-align: right;
}

.product-middle-list .storage-inline span {
  flex: 0 0 auto;
  font-size: 9px;
}

.product-middle-list .storage-inline strong {
  min-width: 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}

@media (max-width: 820px) {
  .product-middle-list .price-card,
  .product-middle-list .stock-card {
    grid-template-columns: minmax(130px, 1fr) minmax(130px, auto);
  }
}


/* --- Termékadat: három egységes hasáb --- */
.product-summary-layout {
  align-items: stretch;
}

.product-data-column,
.product-middle-column,
.product-photo-browser {
  height: 100%;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dce2e6;
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}

.product-data-column {
  gap: 0;
}

.product-column-heading {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid #e7eaed;
  background: #f8fafb;
}

.product-column-heading .section-kicker {
  margin: 0;
}

.product-data-column .priority-card {
  min-height: 50px;
  padding: 9px 14px;
  border-top: 0;
  border-bottom: 1px solid #eef1f3;
  background: transparent;
}

.product-data-column .priority-card:first-of-type {
  border-top: 0;
}

.product-data-column .priority-card:last-child {
  border-bottom: 0;
}

.product-middle-column {
  padding: 0;
}

.product-middle-list .price-card,
.product-middle-list .stock-card {
  min-height: 64px;
}

.product-middle-list .stock-card {
  min-height: 80px;
}

/* A fotóhasáb ugyanazt a semleges stílust kapja, mint a másik kettő. */
.product-panel .product-photo-browser,
.product-panel .product-photo-browser.photo-processed,
.product-panel .product-photo-browser.photo-raw,
.product-panel .product-photo-browser.photo-none {
  margin: 0;
  padding: 0;
  border-color: #dce2e6;
  background: #fff;
}

.product-panel .product-photo-browser.photo-processed .photo-state,
.product-panel .product-photo-browser.photo-raw .photo-state,
.product-panel .product-photo-browser.photo-none .photo-state {
  color: #172129;
}

.product-photo-content {
  padding: 12px 14px 14px;
}

.product-photo-content .photo-state {
  display: block;
  margin: 0 0 4px;
  color: #172129;
  font-size: 13px;
  line-height: 1.3;
}

.product-photo-browser .photo-message {
  min-height: 30px;
  margin: 0 0 10px;
  color: #687076;
  font-size: 11px;
  line-height: 1.35;
}

.product-photo-browser .photo-count {
  color: #687076;
  font-size: 11px;
}

.product-photo-browser .photo-featured {
  width: 100%;
  height: 220px;
  min-height: 220px;
  max-height: 220px;
  padding: 8px;
}

.product-photo-browser .photo-featured img {
  width: 100%;
  height: 100%;
  max-height: 202px;
  object-fit: contain;
}

.product-photo-browser .photo-thumbnails {
  gap: 8px;
  margin-top: 10px;
  padding: 0;
}

.product-photo-browser .photo-thumbnail {
  flex-basis: 64px;
  width: 64px;
  height: 64px;
}

/* A Termékadat panelen nincs információs ikon. */
.product-panel .info-tip {
  display: none !important;
}

@media (max-width: 1180px) {
  .product-data-column,
  .product-middle-column,
  .product-photo-browser {
    height: auto;
  }
}


/* --- Termékadat finomhangolás: igazítás és kiemelések --- */
.product-middle-column {
  margin: 0 !important;
  padding-top: 0 !important;
  align-self: stretch;
}

.product-middle-column.product-context {
  padding-top: 0 !important;
}

.product-middle-list .price-card {
  min-height: 58px;
}

.product-middle-list .stock-card,
.product-middle-list .storage-card {
  min-height: 58px;
}

.product-middle-list .store-price-highlight {
  background: #fff4ec;
  border-left: 4px solid #f36f21;
  padding-left: 10px;
}

.product-middle-list .store-price-highlight .price-card-head p,
.product-middle-list .store-price-highlight .price-value > strong {
  color: #b84912;
  font-weight: 800;
}

.product-middle-list .stock-highlight {
  background: #eef9f1;
  border-left: 4px solid #2e9b59;
  padding-left: 10px;
}

.product-middle-list .stock-highlight .price-card-head p,
.product-middle-list .stock-highlight .stock-quantity {
  color: #176c3c;
  font-weight: 800;
}

.product-middle-list .stock-value,
.product-middle-list .storage-value {
  min-width: 0;
  text-align: right;
}

.product-middle-list .storage-value strong {
  display: block;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.product-middle-list .stock-quantity {
  font-size: 22px !important;
}

.product-middle-list .storage-card {
  align-items: start;
  padding-top: 12px;
  padding-bottom: 12px;
}


/* --- Mihez használható: forrásjelölés és SQL összevetés --- */
.usage-compatibility-evidence {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #e2e6e9;
  border-radius: 10px;
  background: #fafbfb;
}
.usage-compatibility-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.usage-compatibility-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}
.usage-compatibility-chip.direct {
  background: #fff0e6;
  color: #a94715;
  border: 1px solid #f2b183;
}
.usage-compatibility-chip.replacement {
  background: #eef5ff;
  color: #245b9a;
  border: 1px solid #b8d0ee;
}
.usage-compatibility-source-notes {
  display: grid;
  gap: 4px;
  color: #5f6870;
  font-size: 10px;
  line-height: 1.4;
}
.usage-compatibility-source-note strong {
  color: #2f3940;
}
.usage-compatibility-sql-compare {
  padding-top: 8px;
  border-top: 1px solid #e5e8ea;
  color: #59636a;
  font-size: 11px;
  line-height: 1.45;
}
.usage-compatibility-sql-compare.ok { color: #176c3c; font-weight: 700; }
.usage-compatibility-sql-compare.warning { color: #a34e0a; font-weight: 700; }
.usage-compatibility-sql-compare.blocked { color: #9b3024; font-weight: 800; }


/* Külső forrásból talált termékkép */
.product-panel .product-photo-browser.photo-source {
  border-color: #dce2e6;
  background: #fff;
}
.product-panel .product-photo-browser.photo-source .photo-state {
  color: #245b9a;
}


/* --- AI terméktartalom --- */
.ai-generation-info {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #e2e6e9;
  border-radius: 10px;
  background: #fafbfb;
}

.ai-generation-state {
  font-size: 11px;
  line-height: 1.4;
  font-weight: 700;
}

.ai-generation-state.ok { color: #176c3c; }
.ai-generation-state.warning { color: #a34e0a; }
.ai-generation-state.error { color: #9b3024; }
.ai-generation-state.working { color: #245b9a; }

.ai-generation-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  font-size: 10px;
  line-height: 1.4;
}

.ai-generation-sources strong {
  color: #59636a;
  font-size: 10px;
}

.ai-generation-sources a {
  color: #245b9a;
  text-decoration: none;
  border-bottom: 1px dotted #8fb0d3;
}

.ai-source-empty {
  color: #7a8389;
}


/* --- Shop ellenőrzőlista: célzott ACTUAL / SQL feltöltés --- */
.checklist-sql-upload {
  margin: 14px 0 16px;
  padding: 14px 16px;
  border: 1px solid #dce2e6;
  border-radius: 12px;
  background: #fafbfb;
}

.checklist-sql-head {
  display: flex;
  gap: 18px;
  align-items: flex-end;
  justify-content: space-between;
}

.checklist-sql-head h3 {
  margin: 2px 0 4px;
  font-size: 16px;
}

.checklist-sql-head .muted {
  margin: 0;
  font-size: 11px;
}

.checklist-webstatus-control {
  display: grid;
  min-width: 360px;
  gap: 5px;
}

.checklist-webstatus-control > span {
  color: #59636a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.checklist-webstatus-control select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  font-size: 12px;
}

.checklist-table-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-top: 12px;
  padding: 8px 10px;
  border: 1px solid #dfe4e8;
  border-bottom: 0;
  background: #f7f8f9;
}

.checklist-filter-group {
  display: grid;
  gap: 5px;
}

.checklist-filter-label {
  color: #707981;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.checklist-table-toolbar .shop-checklist-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.checklist-table-toolbar .shop-check-filter {
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 11px;
}

/* A státuszszűrők ugyanazt a színlogikát használják, mint a táblázatsorok. */
.checklist-table-toolbar [data-checklist-filter="pass"] {
  border-color: rgba(25, 135, 84, .30);
  background: rgba(25, 135, 84, .07);
  color: #176c3c;
}
.checklist-table-toolbar [data-checklist-filter="pass"].active {
  border-color: #198754;
  background: rgba(25, 135, 84, .17);
  color: #105c32;
}

.checklist-table-toolbar [data-checklist-filter="fail"] {
  border-color: rgba(220, 53, 69, .28);
  background: rgba(220, 53, 69, .065);
  color: #a62b38;
}
.checklist-table-toolbar [data-checklist-filter="fail"].active {
  border-color: #dc3545;
  background: rgba(220, 53, 69, .16);
  color: #8f2230;
}

.checklist-table-toolbar [data-checklist-filter="blocked"] {
  border-color: rgba(108, 117, 125, .32);
  background: rgba(108, 117, 125, .09);
  color: #596168;
}
.checklist-table-toolbar [data-checklist-filter="blocked"].active {
  border-color: #6c757d;
  background: rgba(108, 117, 125, .19);
  color: #444b51;
}

.checklist-table-toolbar [data-checklist-filter="all"].active,
.checklist-table-toolbar .target-filter-all.active {
  border-color: #f36f21;
  background: rgba(243, 111, 33, .12);
  color: #8b390f;
}

/* A célrendszer-szűrőkben pontosan ugyanaz a jelvény jelenik meg, mint a sorokban. */
.checklist-table-toolbar .target-filter-badge {
  display: inline-flex;
  min-width: 64px;
  align-items: center;
  justify-content: center;
  padding: 3px 5px;
  background: transparent;
}
.checklist-table-toolbar .target-filter-badge .checklist-source-badge {
  pointer-events: none;
}
.checklist-table-toolbar .target-filter-badge.active {
  border-color: #f36f21;
  background: rgba(243, 111, 33, .08);
  box-shadow: inset 0 0 0 1px #f36f21;
}

.checklist-no-destination {
  color: #a0a7ad;
  font-size: 12px;
  font-weight: 700;
}

.checklist-sql-items {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 0;
  border: 1px solid #dfe4e8;
  border-bottom: 0;
  background: #fff;
}

.checklist-sql-group-label {
  padding: 7px 12px;
  border-bottom: 1px solid #dfe4e8;
  background: #f5f7f8;
  color: #707981;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.checklist-sql-item {
  display: grid;
  grid-template-columns: 18px 22px 30px minmax(260px, 1fr) minmax(68px, auto) 48px 74px;
  column-gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 7px 10px;
  border-bottom: 1px solid #dfe4e8;
  background: #fff;
  cursor: default;
}

.checklist-sql-item.shop-check,
.checklist-sql-item.shop-check.pass,
.checklist-sql-item.shop-check.fail,
.checklist-sql-item.shop-check.unknown {
  border: 0;
  border-bottom: 1px solid #dfe4e8;
  border-radius: 0;
  overflow: visible;
}

.checklist-sql-item.pass,
.checklist-sql-item.same {
  background: rgba(25, 135, 84, .07);
}

.checklist-sql-item.fail,
.checklist-sql-item.changed {
  background: rgba(220, 53, 69, .065);
}

.checklist-sql-item.blocked,
.checklist-sql-item.unknown {
  background: rgba(108, 117, 125, .09);
}

.checklist-sql-item.pending {
  background: rgba(255, 193, 7, .055);
}

.checklist-sql-item.dragging {
  opacity: .55;
  box-shadow: inset 3px 0 0 #f36f21;
}

.checklist-row-handle {
  display: inline-flex;
  width: 18px;
  height: 28px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #7f8991;
  cursor: grab;
  user-select: none;
}
.checklist-row-handle:active { cursor: grabbing; }
.checklist-row-handle svg {
  width: 12px;
  height: 18px;
  fill: currentColor;
}

.checklist-row-select-spacer {
  display: inline-block;
  width: 16px;
  height: 16px;
}

.checklist-row-select {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
}

.checklist-row-number {
  color: #27323a;
  font-size: 12px;
  text-align: center;
}

.checklist-sql-item-main {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.checklist-sql-item-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
}

.checklist-sql-item-toggle {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #d5dce1;
  border-radius: 4px;
  background: #fff;
  color: #59636a;
  cursor: pointer;
}
.checklist-sql-item-toggle .chevron {
  display: inline-block;
  font-size: 10px;
  line-height: 1;
  transition: transform .15s ease;
}
.checklist-sql-item-toggle[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.checklist-sql-item-main strong {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checklist-sql-item-main > .muted {
  overflow: hidden;
  color: #7c858c;
  font-size: 10px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checklist-sql-item.changed .checklist-sql-item-main strong {
  color: #a34e0a;
}

.checklist-sql-item.same .checklist-sql-item-main strong {
  color: #176c3c;
}

.checklist-sql-item.blocked .checklist-sql-item-main strong,
.checklist-sql-state.blocked {
  color: #9b3024;
}

.checklist-row-destination {
  display: flex;
  justify-content: center;
}

.checklist-source-badge {
  display: inline-flex;
  min-width: 54px;
  min-height: 20px;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .05em;
  line-height: 1;
  text-transform: uppercase;
}

.checklist-source-badge.destination-actual { background: #04aeea; }
.checklist-source-badge.destination-unas { background: #111; }

.checklist-row-result {
  display: inline-flex;
  width: 42px;
  height: 22px;
  align-items: center;
  justify-content: center;
  justify-self: center;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.checklist-sql-item.same .checklist-row-result {
  background: #069c3b;
}
.checklist-sql-item.same .checklist-row-result::before {
  content: "✓";
}

.checklist-sql-item.changed .checklist-row-result {
  background: #ed1018;
}
.checklist-sql-item.changed .checklist-row-result::before {
  content: "×";
}

.checklist-sql-item.blocked .checklist-row-result,
.checklist-sql-item.unknown .checklist-row-result {
  background: #a8afb5;
}
.checklist-sql-item.blocked .checklist-row-result::before,
.checklist-sql-item.unknown .checklist-row-result::before {
  content: "!";
}

.checklist-sql-item.pass .checklist-row-result {
  background: #069c3b;
}
.checklist-sql-item.pass .checklist-row-result::before {
  content: "✓";
}

.checklist-sql-item.fail .checklist-row-result {
  background: #ed1018;
}
.checklist-sql-item.fail .checklist-row-result::before {
  content: "×";
}

.checklist-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.checklist-row-action {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.checklist-row-action svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.checklist-row-edit {
  color: #f36f21;
}

.checklist-row-upload {
  color: #315fd5;
}

.checklist-row-action:hover:not(:disabled) {
  background: #f2f4f5;
}

.checklist-row-action:disabled {
  color: #b9bec3;
  cursor: not-allowed;
  opacity: .8;
}

.checklist-sql-facts {
  grid-column: 4 / -1;
  margin: 5px 0 3px;
  padding: 9px 10px;
  border-left: 3px solid #d8dee2;
  background: #f8fafb;
  color: #59636a;
  font-size: 10px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.checklist-sql-state.ok {
  color: #176c3c;
}

.checklist-sql-state.warning {
  color: #a34e0a;
}

.checklist-common-extra-actions,
.checklist-sql-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.checklist-common-extra-actions button,
.checklist-sql-actions button {
  flex: 0 0 auto;
}

.checklist-common-extra-actions span,
.checklist-sql-actions span {
  min-width: 0;
  font-size: 11px;
  line-height: 1.4;
}

@media (max-width: 900px) {
  .checklist-sql-item {
    grid-template-columns: 18px 22px 26px minmax(180px, 1fr) 54px 42px 64px;
    column-gap: 7px;
  }
  .checklist-source-badge {
    min-width: 48px;
    padding-inline: 5px;
    font-size: 8px;
  }
}

@media (max-width: 760px) {
  .checklist-table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .checklist-sql-head,
  .checklist-common-extra-actions,
  .checklist-sql-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .checklist-webstatus-control {
    min-width: 0;
  }

  .checklist-sql-item {
    grid-template-columns: 18px 22px 24px minmax(0, 1fr) 52px 42px;
    row-gap: 6px;
  }

  .checklist-row-actions {
    grid-column: 5 / 7;
    grid-row: 2;
    justify-content: flex-end;
  }

  .checklist-sql-facts {
    grid-column: 4 / -1;
  }
}

/* --- OpenAI / RAG kezelőfelület --- */
.settings-openai-block .settings-source-form {
  max-width: 760px;
}

.knowledge-rag-panel {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid #dce2e6;
  border-radius: 12px;
  background: #fafbfb;
}

.knowledge-rag-head {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
}

.knowledge-rag-head h3 {
  margin: 2px 0 4px;
}

.knowledge-rag-head .muted {
  margin: 0;
}

.knowledge-rag-search-form {
  margin-top: 12px;
}

.knowledge-rag-search-form > label {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 700;
}

.knowledge-rag-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px auto;
  gap: 8px;
}

.knowledge-rag-state {
  margin: 9px 0 0;
  font-size: 11px;
}

.knowledge-rag-state.ok { color: #176c3c; }
.knowledge-rag-state.error { color: #9b3024; }
.knowledge-rag-state.working { color: #245b9a; }

.knowledge-rag-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

@media (max-width: 760px) {
  .knowledge-rag-head {
    align-items: stretch;
    flex-direction: column;
  }

  .knowledge-rag-search-row {
    grid-template-columns: 1fr;
  }
}


/* --- Webshop tartalom prioritás --- */
.product-panel { order: 1; }
.content-panel { order: 2; }
.workflow-panel { order: 3; }

.content-panel #generateAiContent {
  font-weight: 800;
}


/* LOG munkaterület */
.log-workspace {
  display: block;
  min-height: 520px;
}

.log-workspace.hidden {
  display: none;
}

.log-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.log-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
}

.button-link.secondary {
  background: #f1f3f4;
  color: #222;
}

.log-filters {
  display: grid;
  grid-template-columns: 160px minmax(180px, 1fr) 130px;
  gap: 12px;
  margin-bottom: 12px;
}

.log-filters label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}

.log-filters select,
.log-filters input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #ccd1d6;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
}

.log-output {
  min-height: 460px;
  max-height: 68vh;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #d9dde1;
  border-radius: 12px;
  background: #111315;
  color: #e8eaed;
  white-space: pre-wrap;
  overflow: auto;
  overflow-wrap: anywhere;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .log-head {
    display: block;
  }

  .log-actions {
    justify-content: flex-start;
    margin-top: 12px;
  }

  .log-filters {
    grid-template-columns: 1fr 1fr;
  }
}


.ai-content-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

#aiSavedState {
  display: block;
  margin-top: 6px;
  font-size: 12px;
}


/* Súgó kizárólag az i ikon kattintására nyílhat meg. */
.info-tip:not(.is-open)::after,
.info-tip:not(.is-open)::before {
  opacity: 0 !important;
  visibility: hidden !important;
}

.info-tip.is-open::after,
.info-tip.is-open::before {
  visibility: visible;
}


/* Keresési előzmények */
.search-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid #eceff1;
}

.search-history-header strong {
  font-size: 12px;
}

.search-history-clear {
  min-height: 30px;
  padding: 5px 9px;
  border: 0;
  background: transparent;
  color: #8a3a2d;
  font-size: 11px;
  font-weight: 700;
}

.search-history-item {
  border-top: 0;
}


/* Info / szerver telemetria */
.info-workspace {
  display: block;
  min-height: 520px;
}

.info-workspace.hidden {
  display: none;
}

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

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.info-card,
.info-detail-card {
  border: 1px solid #dfe3e6;
  border-radius: 12px;
  background: #fff;
}

.info-card {
  padding: 16px;
}

.info-card-label {
  display: block;
  margin-bottom: 7px;
  color: #6f777d;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.info-card strong {
  display: block;
  font-size: 22px;
  line-height: 1.2;
}

.info-card small {
  display: block;
  margin-top: 7px;
  color: #697279;
  line-height: 1.4;
}

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

.info-detail-card {
  padding: 16px;
}

.info-detail-card h4 {
  margin: 0 0 12px;
}

.info-detail-card dl {
  margin: 0;
}

.info-detail-card dl > div {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid #eef1f3;
}

.info-detail-card dl > div:first-child {
  border-top: 0;
}

.info-detail-card dt {
  color: #747c82;
  font-size: 12px;
}

.info-detail-card dd {
  margin: 0;
  overflow-wrap: anywhere;
  text-align: right;
  font-weight: 700;
}

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

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

@media (max-width: 650px) {
  .info-head {
    display: block;
  }

  .info-head button {
    margin-top: 10px;
  }

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


.background-worker-panel {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #dfe3e6;
  border-radius: 12px;
  background: #fff;
}

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

.background-worker-head h4 {
  margin: 0;
}

.background-worker-actions {
  display: flex;
  gap: 8px;
}

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

.background-worker-grid > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #edf0f2;
  border-radius: 9px;
  background: #fafbfc;
}

.background-worker-grid span {
  display: block;
  margin-bottom: 5px;
  color: #747c82;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.background-worker-grid strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.35;
}

.background-recent {
  margin-top: 16px;
}

.background-recent h4 {
  margin: 0 0 10px;
}

.background-recent-list {
  display: grid;
  gap: 7px;
}

.background-job-row {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #edf0f2;
  border-radius: 9px;
  background: #fcfcfd;
}

.background-job-row strong {
  font-size: 12px;
}

.background-job-row span,
.background-job-row small {
  overflow-wrap: anywhere;
  font-size: 11px;
  line-height: 1.4;
}

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

@media (max-width: 650px) {
  .background-worker-head {
    display: block;
  }

  .background-worker-actions {
    margin-top: 10px;
  }

  .background-worker-grid {
    grid-template-columns: 1fr;
  }
}


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

.settings-ai-provider-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #dfe3e6;
  border-radius: 10px;
  background: #fff;
}

.settings-ai-provider-card.selected {
  border-width: 2px;
}

.settings-ai-provider-card .settings-secret-status {
  margin: 0;
}

.settings-ai-provider-card button {
  justify-self: start;
}

@media (max-width: 850px) {
  .settings-ai-provider-grid {
    grid-template-columns: 1fr;
  }
}


.ai-cost-summary {
  margin: 10px 0 4px;
  padding: 12px;
  border: 1px solid #e1e5e8;
  border-radius: 10px;
  background: #fafbfc;
}

.ai-cost-summary-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 10px;
}

.ai-cost-summary-head strong {
  font-size: 13px;
}

.ai-cost-summary-head span {
  font-size: 11px;
  color: #697178;
  text-align: right;
}

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

.ai-cost-grid > div {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #edf0f2;
  border-radius: 8px;
  background: #fff;
}

.ai-cost-grid span {
  display: block;
  margin-bottom: 4px;
  color: #747c82;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.ai-cost-grid strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 12px;
}

#aiCostFx {
  display: block;
  margin-top: 8px;
  font-size: 10px;
}

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


.ai-inline-provider {
  display: flex;
  gap: 6px;
  align-items: center;
}

.ai-inline-provider select {
  height: 38px;
  min-height: 38px;
  padding: 0 34px 0 10px;
  border: 1px solid #cfd4d8;
  border-radius: 9px;
  background: #fff;
  font: inherit;
  font-size: 12px;
  line-height: 1;
}

#aiInlineProvider {
  width: 110px;
  min-width: 110px;
}

#aiInlineModel {
  width: 190px;
  min-width: 190px;
}

.ai-saved-versions {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid #e4e7e9;
}

.ai-saved-versions-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.ai-saved-versions-head h4 {
  margin: 0;
}

.ai-saved-versions-list {
  display: grid;
  gap: 7px;
}

.ai-saved-version-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid #e5e8ea;
  border-radius: 8px;
  background: #fbfcfc;
}

.ai-saved-version-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.ai-saved-version-main strong,
.ai-saved-version-main span {
  overflow-wrap: anywhere;
}

.ai-saved-version-main strong {
  font-size: 12px;
}

.ai-saved-version-main span {
  color: #747c82;
  font-size: 10px;
}

@media (max-width: 900px) {
  .ai-inline-provider {
    width: 100%;
  }

  #aiInlineProvider,
  #aiInlineModel {
    flex: 1;
    width: auto;
    min-width: 0;
  }

  .ai-saved-version-row {
    align-items: flex-start;
  }
}


.ai-saved-version-title {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.ai-version-kind {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 6px;
  border: 1px solid #d9dde0;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .035em;
}

.ai-version-kind.generated {
  border-color: #b8dcc4;
  background: #eef9f1;
  color: #176c3c;
}

.ai-version-kind.edited {
  border-color: #f2c8aa;
  background: #fff4ec;
  color: #a34e0a;
}

.ai-version-kind.legacy {
  background: #f1f3f4;
  color: #687076;
}

.ai-saved-version-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.ai-version-delete {
  color: #9b3024;
}

@media (max-width: 650px) {
  .ai-saved-version-row {
    display: grid;
  }

  .ai-saved-version-actions {
    justify-content: flex-end;
  }
}


/* Külön Termékleírás munkafül */
.description-workspace {
  display: block;
  min-height: 620px;
  padding: 18px;
}

.description-workspace.hidden {
  display: none;
}

.description-workspace-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.description-workspace-head h2 {
  margin: 2px 0 4px;
}

.description-workspace-head .muted {
  margin: 0;
}

.description-workspace .ai-content-actions {
  max-width: 760px;
}

.description-editor-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.description-fields {
  display: grid;
  gap: 12px;
}

.description-fields label {
  display: grid;
  gap: 6px;
}

.description-fields textarea {
  width: 100%;
  min-height: 110px;
}

.description-fields #longDescription {
  min-height: 360px;
}

.description-workspace .ai-saved-versions {
  margin-top: 0;
  padding-top: 16px;
}

.compatibility-panel .panel-head {
  margin-bottom: 8px;
}

@media (max-width: 900px) {
  .description-workspace-head {
    display: grid;
  }

  .description-workspace .ai-content-actions {
    justify-content: flex-start;
  }
}


/* AI termékleírás profil */
.description-profile-controls {
  display: flex;
  gap: 8px;
  align-items: end;
}

.description-profile-controls label {
  display: grid;
  gap: 4px;
}

.description-profile-controls label > span {
  color: #687076;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.description-profile-controls select {
  height: 38px;
  min-height: 38px;
  padding: 0 32px 0 10px;
  border: 1px solid #cfd4d8;
  border-radius: 9px;
  background: #fff;
  font-size: 12px;
}

#aiDetailLevel {
  min-width: 120px;
}

#aiServiceInfo {
  min-width: 155px;
}

/* Tartós AI termékleírás-szabályok */
.description-rules-panel {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid #dce2e6;
  border-radius: 12px;
  background: #fafbfb;
}

.description-rules-head h3 {
  margin: 2px 0 4px;
}

.description-rules-head .muted {
  margin: 0;
}

.description-rule-form {
  margin-top: 12px;
}

.description-rule-form > label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 800;
}

.description-rule-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.description-rule-input-row textarea {
  min-height: 78px;
  resize: vertical;
}

.description-rule-input-row button {
  align-self: stretch;
}

#descriptionRuleState {
  margin: 8px 0 0;
  font-size: 11px;
}

.description-rules-list {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.description-rule-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid #e2e6e9;
  border-radius: 9px;
  background: #fff;
}

.description-rule-row.inactive {
  opacity: .62;
}

.description-rule-body {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.description-rule-body p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.description-rule-status {
  justify-self: start;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .035em;
}

.description-rule-status.active {
  border: 1px solid #b8dcc4;
  background: #eef9f1;
  color: #176c3c;
}

.description-rule-status.inactive {
  border: 1px solid #d9dde0;
  background: #f1f3f4;
  color: #687076;
}

.description-rule-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.description-rule-delete {
  color: #9b3024;
}

.description-rule-edit {
  width: 100%;
  min-height: 72px;
}

@media (max-width: 900px) {
  .description-profile-controls {
    width: 100%;
    flex-wrap: wrap;
  }

  .description-rule-input-row,
  .description-rule-row {
    display: grid;
  }

  .description-rule-actions {
    justify-content: flex-end;
  }
}


.ai-source-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border: 1px solid #dfe3e6;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
}

.ai-source-status.ok {
  border-color: #b8dcc4;
  background: #eef9f1;
  color: #176c3c;
}

.ai-source-status.empty {
  background: #f1f3f4;
  color: #687076;
}

.ai-source-status.error {
  border-color: #efc2bd;
  background: #fff0ee;
  color: #9b3024;
}


.ai-saved-version-profile {
  color: #4f5960;
  font-size: 10px;
  font-weight: 700;
}


.product-value-with-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.product-block-warning {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid #b42318;
  border-radius: 4px;
  background: #fff0ee;
  color: #b42318;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .025em;
  text-transform: uppercase;
}

.product-block-warning.hidden {
  display: none;
}

.product-block-warning:not(.hidden) {
  animation: wsa-product-block-blink 1s steps(2, start) infinite;
}

@keyframes wsa-product-block-blink {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: .22; }
}

.product-refresh {
  min-height: 32px;
  padding: 5px 10px;
}

.workspace-tab.product-gate-disabled {
  opacity: .45;
  cursor: not-allowed;
}

.product-panel.product-gate-blocked,
.compatibility-panel.product-gate-blocked {
  border-color: #e2b7b1;
}

.product-gate-note {
  color: #b42318;
  font-weight: 800;
}


.description-rule-scope-row {
  display: flex;
  gap: 12px;
  align-items: end;
  margin-top: 10px;
  flex-wrap: wrap;
}

.description-rule-scope-row label {
  display: grid;
  gap: 5px;
  min-width: 220px;
}

.description-rule-scope-row select,
.description-rule-scope-row input,
.description-rule-scope-edit,
.description-rule-scope-value-edit {
  min-height: 36px;
}

.description-rule-scope-help {
  margin-top: 7px;
}

.description-rule-scope {
  display: inline-flex;
  width: fit-content;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid #cfd6dc;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .03em;
}

.description-rule-edit-wrap {
  display: grid;
  gap: 8px;
  width: 100%;
}


.description-snippet-insert,
.description-snippets-panel {
  border: 1px solid var(--line, #d9dee3);
  border-radius: 12px;
  padding: 14px;
  background: var(--surface, #fff);
}

.description-snippet-insert {
  margin: 12px 0 16px;
}

.description-snippet-insert h4,
.description-snippets-panel h3 {
  margin: 2px 0 4px;
}

.description-snippet-insert-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.description-snippet-insert-row select {
  min-width: 320px;
  flex: 1 1 360px;
}

.description-snippet-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.description-snippet-form label {
  display: grid;
  gap: 5px;
}

.description-snippet-form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.description-snippet-title-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.description-snippet-title-row strong {
  font-size: 14px;
}


.order-list-workspace {
  display: grid;
  gap: 14px;
}

.order-list-head,
.order-list-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.order-list-head h2 {
  margin: 2px 0 4px;
}

.order-list-meta {
  padding: 10px 12px;
  border: 1px solid var(--line, #d9dee3);
  border-radius: 10px;
}

.order-list-warnings {
  border: 1px solid #d7a100;
  border-radius: 10px;
  padding: 10px 12px;
}

.order-list-warnings p {
  margin: 0;
}

.order-list-warnings p + p {
  margin-top: 6px;
}

.order-list-table-wrap {
  overflow-x: auto;
}

.order-list-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.order-list-table th,
.order-list-table td {
  border-bottom: 1px solid var(--line, #d9dee3);
  padding: 9px 10px;
  text-align: left;
  vertical-align: middle;
}

.order-list-table th {
  position: sticky;
  top: 0;
  background: var(--surface, #fff);
  z-index: 1;
}

.order-list-table .number {
  text-align: right;
  white-space: nowrap;
}

.order-list-article {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.order-list-name {
  min-width: 260px;
}

.order-list-quantity {
  width: 110px;
  text-align: right;
  font-weight: 700;
}


.order-list-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line, #d9dee3);
  border-radius: 10px;
}

.order-list-filters label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.order-list-order-article {
  min-width: 170px;
}

.order-list-order-article strong,
.order-list-order-article small {
  display: block;
}

.order-list-order-article small {
  margin-top: 2px;
  color: var(--muted, #667085);
  line-height: 1.25;
}

.order-list-shortage {
  font-weight: 700;
}

.order-list-status {
  white-space: nowrap;
  font-weight: 700;
}

.order-list-status[data-status="needs_order"] {
  text-transform: uppercase;
}


/* Rendelési lista – kompakt, visszafogott vezérlők */
.order-list-workspace {
  gap: 8px;
}

.order-list-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  padding: 5px 7px;
  border: 1px solid var(--line, #d9dee3);
  border-radius: 4px;
}

.order-list-filter-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

.order-list-filter-group + .order-list-filter-group {
  padding-left: 10px;
  border-left: 1px solid var(--line, #d9dee3);
}

.order-list-filter-label {
  font-size: 12px;
  font-weight: 700;
  margin-right: 2px;
}

.order-list-filter-group label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 22px;
  margin: 0;
  padding: 1px 3px;
  border-radius: 3px;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.2;
}

.order-list-filter-group input {
  margin: 0;
}

.order-list-meta {
  padding: 5px 7px;
  border-radius: 4px;
  gap: 6px 10px;
  font-size: 12px;
}

.order-list-block {
  border: 1px solid var(--line, #d9dee3);
  border-radius: 4px;
  overflow: hidden;
}

.order-list-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 8px;
  border-bottom: 1px solid var(--line, #d9dee3);
}

.order-list-block-head h3 {
  margin: 1px 0 0;
  font-size: 15px;
}

.order-list-collapse-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  padding: 0;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.order-list-collapse-toggle:hover {
  background: #f2f4f7;
  border-color: #98a2b3;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .12);
}

.order-list-collapse-toggle:focus-visible {
  outline: 2px solid #667085;
  outline-offset: 2px;
}

.order-list-collapse-icon {
  width: 18px;
  height: 18px;
  display: block;
  transition: transform .15s ease;
}

.order-list-collapse-toggle[aria-expanded="false"] .order-list-collapse-icon {
  transform: rotate(180deg);
}

.order-list-block-content.collapsed {
  display: none;
}

.order-list-table th,
.order-list-table td {
  padding: 5px 7px;
  line-height: 1.2;
}

.order-list-quantity {
  width: 84px;
  min-height: 26px;
  padding: 2px 5px;
  border-radius: 3px;
}

.order-list-order-article small {
  margin-top: 1px;
}

.order-list-status {
  font-size: 12px;
}

@media (max-width: 900px) {
  .order-list-filter-group + .order-list-filter-group {
    width: 100%;
    padding-left: 0;
    padding-top: 4px;
    border-left: 0;
    border-top: 1px solid var(--line, #d9dee3);
  }
}


.order-list-status[data-status="processing_wait"] {
  font-weight: 700;
  text-transform: uppercase;
}

.order-list-quantity:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}


/* Rendelési lista – sűrű táblázat és státuszszínek */
.order-list-table {
  table-layout: fixed;
  min-width: 1060px;
}

.order-list-table th,
.order-list-table td {
  padding: 3px 5px;
  line-height: 1.1;
}

.order-list-table th {
  font-size: 11px;
  white-space: normal;
}

.order-list-select-head,
.order-list-select-cell {
  width: 28px;
  text-align: center !important;
  padding-left: 3px !important;
  padding-right: 3px !important;
}

.order-list-select-cell input,
.order-list-select-head input {
  margin: 0;
}

.order-stock-col {
  width: 64px;
}

.order-list-table th:nth-child(2) {
  width: 122px;
}

.order-list-table th:nth-child(3) {
  width: 260px;
}

.order-list-table th:nth-child(7) {
  width: 58px;
}

.order-list-table th:nth-child(8) {
  width: 92px;
}

.order-list-table th:nth-child(9) {
  width: 205px;
}

.order-list-table th:nth-child(10) {
  width: 78px;
}

.order-list-table th:nth-child(11) {
  width: 150px;
}

.order-list-name,
.order-list-order-article {
  min-width: 0;
}

.order-list-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-list-order-article strong,
.order-list-order-article small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-list-order-article small {
  font-size: 10px;
  line-height: 1.05;
}

.order-list-quantity {
  width: 72px;
  min-height: 22px;
  height: 22px;
  padding: 1px 4px;
  font-size: 12px;
}

/* A cella table-cell marad, így a sor teljes magasságát kitölti. */
.order-list-status-cell {
  display: table-cell;
  vertical-align: middle;
}

.order-list-status-cell > * {
  display: block;
  width: fit-content;
  margin: 0 0 2px 0;
}

.order-list-status-cell > *:last-child {
  margin-bottom: 0;
}

.order-list-status {
  display: inline-block;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 11px;
  line-height: 1.15;
  white-space: nowrap;
}

.order-list-status[data-status="needs_order"] {
  background: #fff0d5;
  color: #9a4b00;
}

.order-list-status[data-status="ordered"] {
  background: #f2f4f7;
  color: #344054;
}

.order-list-status[data-status="confirmed"] {
  background: #e5f6e8;
  color: #1f6d2d;
}

.order-list-status[data-status="processing_wait"] {
  background: #e6f0ff;
  color: #1756a9;
}

.order-list-select-disabled {
  opacity: 0.45;
}

.order-list-row-select:disabled {
  cursor: not-allowed;
}


/* Rendelési lista – az első táblázathoz tartozó függőleges szűrők */
.order-list-first-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px 16px;
  width: fit-content;
  max-width: 100%;
  padding: 7px 9px;
  border-bottom: 1px solid var(--line, #d9dee3);
}

.order-list-filter-column {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 4px;
  width: max-content;
  max-width: 100%;
}

.order-list-filter-title {
  font-size: 12px;
  margin-bottom: 2px;
}

.order-list-filter-column label {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  width: max-content;
  max-width: 100%;
  min-height: 20px;
  margin: 0;
  font-size: 12px;
  line-height: 1.15;
}

.order-list-filter-column input {
  margin: 0;
}

.order-list-filter-subgroup {
  display: grid;
  gap: 3px;
  margin-top: 2px;
  padding-left: 18px;
}

.order-list-filter-subgroup > span {
  font-size: 12px;
  font-weight: 600;
  margin-left: -18px;
}

.order-list-code-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  flex-wrap: wrap;
  row-gap: 2px;
}

.order-list-code-wrap > span,
.order-list-code-wrap > strong {
  flex: 0 1 auto;
  min-width: 0;
}

.order-list-copy-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  padding: 2px;
  border: 1px solid #d9dee3;
  border-radius: 4px;
  background: #f7f8f9;
  color: #475467;
  cursor: pointer;
  opacity: 1;
}

.order-list-copy-button:hover {
  background: #eef1f3;
  border-color: #c9d0d6;
}

.order-list-copy-button.copied {
  background: #eaf6ec;
  border-color: #b7d9bd;
  color: #236b2f;
}

.order-list-copy-button svg {
  display: block;
  width: 14px;
  height: 14px;
  fill: currentColor;
}

@media (max-width: 760px) {
  .order-list-first-filters {
    display: grid;
    width: 100%;
    gap: 9px;
  }

  .order-list-filter-column,
  .order-list-filter-column label {
    width: max-content;
    max-width: 100%;
  }
}


/* Rendelési lista – szezonon kívüli jelölések */
.order-list-name {
  min-width: 0;
}

.order-list-name-wrap {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 4px;
  white-space: nowrap;
}

.order-list-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-list-offseason-label {
  flex: 0 0 auto;
  color: #c45a00;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .02em;
}

.order-list-footnote-marker {
  margin-left: 1px;
  color: #c45a00;
  font-size: 8px;
  font-weight: 800;
}

.order-list-offseason-footnote {
  margin: 5px 8px 7px;
  color: #7a4a1b;
  font-size: 10px;
  line-height: 1.35;
}

.order-list-offseason-footnote sup {
  color: #c45a00;
  font-weight: 900;
}


.order-list-workspace.hidden {
  display: none;
}


.order-list-storage {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}


/* Rendelési lista – vevői rendelési igények */
.order-list-demand-block .order-list-block-head > div {
  min-width: 0;
}

.order-list-demand-block .order-list-block-head .muted {
  margin: 2px 0 0;
  font-size: 11px;
}

.order-list-demand-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 12px;
  width: fit-content;
  max-width: 100%;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line, #d9dee3);
  font-size: 12px;
}

.order-list-demand-filters strong {
  margin-right: 2px;
}

.order-list-demand-filters label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.order-list-demand-filters input {
  margin: 0;
}

.order-list-demand-table {
  min-width: 1160px;
  table-layout: fixed;
}

.order-list-demand-table th:nth-child(1) { width: 28px; }
.order-list-demand-table th:nth-child(2) { width: 145px; }
.order-list-demand-table th:nth-child(3) { width: 180px; }
.order-list-demand-table th:nth-child(4) { width: 145px; }
.order-list-demand-table th:nth-child(5) { width: auto; }
.order-list-demand-table th:nth-child(6) { width: 105px; }
.order-list-demand-table th:nth-child(7) { width: 115px; }
.order-list-demand-table th:nth-child(8) { width: 210px; }

/* Vevői rendelések: tömör, 11 oszlopos elrendezés.
   A szervizrendelések külön maradnak a fenti általános beállításon. */
.order-list-customer-demand-table {
  min-width: 1292px;
}

.order-list-customer-demand-table th:nth-child(1) { width: 28px; }
.order-list-customer-demand-table th:nth-child(2) { width: 185px; }
.order-list-customer-demand-table th:nth-child(3) { width: 125px; }
.order-list-customer-demand-table th:nth-child(4) { width: 230px; }
.order-list-customer-demand-table th:nth-child(5) { width: 82px; }
.order-list-customer-demand-table th:nth-child(6) { width: 78px; }
.order-list-customer-demand-table th:nth-child(7) { width: 62px; }
.order-list-customer-demand-table th:nth-child(8) { width: 92px; }
.order-list-customer-demand-table th:nth-child(9) { width: 184px; }
.order-list-customer-demand-table th:nth-child(10) { width: 82px; }
.order-list-customer-demand-table th:nth-child(11) { width: 118px; }

.order-list-demand-customer-order strong,
.order-list-demand-customer-order small {
  display: block;
}

.order-list-demand-customer-order strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-list-demand-customer-order .order-list-demand-order-number {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

.order-list-demand-customer-order .order-list-demand-order-date {
  margin-top: 1px;
  color: var(--muted, #667085);
  font-size: 9px;
  line-height: 1.1;
  white-space: nowrap;
}

.order-list-demand-order strong,
.order-list-demand-order small {
  display: block;
  white-space: nowrap;
}

.order-list-demand-order small {
  margin-top: 2px;
  color: var(--muted, #667085);
  font-size: 10px;
}

.order-list-demand-customer {
  font-weight: 700;
}

.order-list-demand-table th,
.order-list-demand-table td {
  vertical-align: middle !important;
}

.order-list-demand-group-cell {
  vertical-align: middle !important;
  background: rgba(0, 0, 0, .015);
}

.order-list-demand-group-start td {
  border-top: 2px solid #cfd6dc;
}

.order-list-demand-group-start:first-child td {
  border-top-width: 0;
}

.order-list-demand-quantity {
  font-weight: 800;
}

.order-list-demand-status {
  display: inline-block;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.order-list-demand-status.needs_order {
  background: #fff0d5;
  color: #9a4b00;
}

.order-list-demand-status.supplier_ordered {
  background: #eef2ff;
  color: #3448a4;
}

.order-list-demand-status.production_reserved {
  background: #f3ecfa;
  color: #5b2a86;
}

.order-list-demand-status.supplier_confirmed {
  background: #e5f6e8;
  color: #1f6d2d;
}

.order-list-demand-status.recorded {
  background: #f2f4f7;
  color: #344054;
  border: 1px solid #d0d5dd;
}

.order-list-demand-status.production_reserved {
  background: #e8f2ff;
  color: #1759a6;
  border: 1px solid #b9d7fb;
}

.order-list-demand-status.processing_wait {
  background: #e6f0ff;
  color: #1756a9;
  border: 1px solid #bfdcff;
}

.order-list-demand-status.stale_review {
  background: #f1f3f4;
  color: #5f6368;
  border: 1px solid #d9dee3;
}

.order-list-demand-row-select:disabled {
  cursor: not-allowed;
}

.order-list-demand-meta {
  border-width: 0 0 1px;
  border-radius: 0;
}



/* Visszaigazolt szállítói rendelés – szabad készlet figyelmeztetés */
.order-list-demand-stock-warning {
  display: block;
  width: fit-content;
  margin-top: 3px;
  padding: 2px 5px;
  border: 1px solid #e0a100;
  border-radius: 3px;
  background: #fff7d6;
  color: #8a4b00;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}

.order-list-demand-reservation-warning td {
  background-image: linear-gradient(rgba(255, 244, 204, .22), rgba(255, 244, 204, .22));
}


/* Rendelési lista – szerviz munkalap igények */
.order-list-service-block .order-list-block-head {
  background: rgba(0, 0, 0, .012);
}

.order-list-service-block .order-list-demand-group-cell {
  background: rgba(0, 0, 0, .022);
}


/* Vevői és szerviz rendelési mennyiség – minimum készlet korrekció */
.order-list-demand-minimum-marker {
  margin-left: 1px;
  color: #c45a00;
  font-size: 8px;
  font-weight: 900;
}

.order-list-demand-required,
.order-list-demand-quantity {
  font-weight: 800;
}

.order-list-demand-quantity:has(.order-list-demand-minimum-marker) {
  color: #8a4b00;
}

.order-list-demand-footnote {
  margin: 5px 8px 7px;
  color: #7a4a1b;
  font-size: 10px;
  line-height: 1.35;
}

.order-list-demand-footnote sup {
  color: #c45a00;
  font-weight: 900;
}


/* Rendelési lista – egységes fekete fejlécek és kompakt nyilas vezérlők */
.order-list-block-head {
  min-height: 44px;
  padding: 7px 10px;
  background: #111;
  border-bottom: 0;
  color: #fff;
}

.order-list-block-head h2 {
  margin: 0;
  color: #fff;
  font-size: 1.5em;
  line-height: 1.15;
  font-weight: 700;
}

.order-list-collapse-toggle {
  display: inline-grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  min-height: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 4px;
  background: transparent;
  color: #fff;
}

.order-list-collapse-toggle:hover {
  background: rgba(255,255,255,.12);
  border-color: #fff;
}

.order-list-collapse-icon {
  font-size: 18px;
  line-height: 1;
  transition: transform .18s ease;
}

.order-list-collapse-toggle[aria-expanded="false"] .order-list-collapse-icon {
  transform: rotate(180deg);
}

.order-list-filter-collapse {
  border-bottom: 1px solid var(--line, #d9dee3);
}

.order-list-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  margin: 5px 7px;
  padding: 3px 7px;
  border: 1px solid #cfd6dc;
  border-radius: 4px;
  background: #f7f8f9;
  color: #475467;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.order-list-filter-toggle:hover {
  background: #eef1f3;
}

.order-list-filter-icon {
  display: inline-block;
  font-size: 13px;
  line-height: 1;
  transition: transform .18s ease;
}

.order-list-filter-toggle[aria-expanded="true"] .order-list-filter-icon {
  transform: rotate(180deg);
}

.order-list-filter-content.collapsed {
  display: none;
}

/* A szűrő saját kerete adja a blokkhatárt; belül ne legyen dupla alsó vonal. */
.order-list-filter-content .order-list-first-filters,
.order-list-filter-content .order-list-demand-filters {
  border-bottom: 0;
}

/* Egységes státusz címkék mindhárom rendelési táblában. */
.order-list-status,
.order-list-demand-status {
  display: inline-block;
  min-height: 20px;
  padding: 3px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: none;
  white-space: nowrap;
}


/* Rendelési lista – végleges fejléc és valódi SVG chevron gomb */
.order-list-block .order-list-block-head,
.order-list-service-block .order-list-block-head {
  background: #111 !important;
  color: #fff !important;
}

.order-list-block .order-list-block-head h2 {
  color: #fff !important;
}

.order-list-collapse-toggle {
  width: 34px;
  height: 34px;
  min-height: 34px;
  flex: 0 0 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  box-shadow: none;
}

.order-list-collapse-toggle:hover {
  background: rgba(255, 255, 255, .16);
  border-color: #fff;
}

.order-list-collapse-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.order-list-collapse-icon {
  display: block;
  width: 20px;
  height: 20px;
  font-size: 0;
  line-height: 0;
  transition: transform .18s ease;
  transform-origin: 50% 50%;
}

.order-list-collapse-toggle[aria-expanded="false"] .order-list-collapse-icon {
  transform: rotate(180deg);
}


/* Rövid fel/le csukási animáció és egységes szűrőgomb */
.order-list-collapse-icon,
.order-list-filter-icon {
  transition: transform 90ms ease;
}

.order-list-filter-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  margin: 5px 7px;
  padding: 4px 9px;
  border: 1px solid #cfd6dc;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: background 90ms ease, border-color 90ms ease, box-shadow 90ms ease;
}

.order-list-filter-toggle:hover {
  background: #f2f4f7;
  border-color: #98a2b3;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .12);
}

.order-list-filter-toggle:focus-visible {
  outline: 2px solid #667085;
  outline-offset: 2px;
}

.order-list-filter-icon {
  display: block;
  width: 16px;
  height: 16px;
  transform-origin: 50% 50%;
}

.order-list-filter-toggle[aria-expanded="false"] .order-list-filter-icon {
  transform: rotate(180deg);
}

.order-list-filter-toggle[aria-expanded="true"] .order-list-filter-icon {
  transform: rotate(0deg);
}


/* Rendelési lista – kliensoldali, húzható CSV fájl */
.order-list-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.order-list-csv-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 9px;
  border: 1px solid #cfd6dc;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
  cursor: grab;
  user-select: none;
}

.order-list-csv-file:hover {
  border-color: #98a2b3;
  background: #f8fafc;
}

.order-list-csv-file:active {
  cursor: grabbing;
}

.order-list-csv-file.disabled {
  opacity: .48;
  cursor: not-allowed;
  pointer-events: auto;
}

.order-list-csv-file > svg {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  fill: currentColor;
}

.order-list-csv-file-text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.order-list-csv-file-text strong {
  font-size: 12px;
  line-height: 1.2;
}

.order-list-csv-file-text small {
  color: #667085;
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}


/* Rendelési lista – manuális hozzáadás */
.order-list-manual-search {
  position: relative;
  display: grid;
  gap: 5px;
  padding: 8px;
  border-bottom: 1px solid var(--line, #d9dee3);
}

.order-list-manual-search > label {
  font-size: 11px;
  font-weight: 800;
}

.order-list-manual-search-row {
  display: grid;
  grid-template-columns: minmax(260px, 560px) auto;
  gap: 7px;
  align-items: start;
  justify-content: start;
}

.order-list-manual-search-row .lookup-input-wrap,
.order-list-manual-search-row input {
  width: 100%;
}

.order-list-manual-search-row > button {
  min-height: 38px;
  padding: 7px 12px;
}

.order-list-manual-table {
  min-width: 1060px;
}

.order-list-manual-table th:nth-child(1) { width: 28px; }
.order-list-manual-table th:nth-child(2) { width: 122px; }
.order-list-manual-table th:nth-child(3) { width: 260px; }
.order-list-manual-table th:nth-child(4),
.order-list-manual-table th:nth-child(5),
.order-list-manual-table th:nth-child(6) { width: 64px; }
.order-list-manual-table th:nth-child(7) { width: 58px; }
.order-list-manual-table th:nth-child(8) { width: 92px; }
.order-list-manual-table th:nth-child(9) { width: 205px; }
.order-list-manual-table th:nth-child(10) { width: 78px; }
.order-list-manual-table th:nth-child(11) { width: 150px; }

.order-list-manual-table th,
.order-list-manual-table td {
  vertical-align: middle !important;
}

.order-list-manual-remove {
  padding: 4px 7px;
}

.order-list-csv-file,
.order-list-csv-file:active {
  cursor: pointer;
}


/* CSV kártya: valódi draggable fájlforrás */
button.order-list-csv-file {
  font: inherit;
  text-align: left;
  appearance: none;
}

.order-list-csv-file:not(.disabled) {
  cursor: grab;
}

.order-list-csv-file:not(.disabled):active {
  cursor: grabbing;
}


/* Megrendelések fül */
.orders-workspace {
  gap: 10px;
}

.orders-workspace.hidden {
  display: none;
}

.orders-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.orders-header h2 {
  margin: 0;
}

.orders-header .muted {
  margin: 4px 0 0;
}

.orders-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 6px 8px;
  border: 1px solid var(--line, #d9dee3);
  border-radius: 4px;
  font-size: 12px;
}

.orders-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line, #d9dee3);
  border-radius: 4px;
}

.orders-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  table-layout: fixed;
}

.orders-table th,
.orders-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line, #e5e7eb);
  vertical-align: middle;
  line-height: 1.2;
}

.orders-table th {
  background: #111;
  color: #fff;
  text-align: left;
  font-size: 11px;
  font-weight: 800;
}

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

.orders-table th:nth-child(1) { width: 78px; }
.orders-table th:nth-child(2) { width: 210px; }
.orders-table th:nth-child(3) { width: 178px; }
.orders-table th:nth-child(4) { width: auto; }
.orders-table th:nth-child(5) { width: 96px; }
.orders-table th:nth-child(6) { width: 230px; }

.orders-table .number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.orders-article {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Pénzügy fül - ÁFA analitika */
.finance-vat-workspace {
  gap: 14px;
}

.finance-vat-workspace.hidden {
  display: none;
}

.finance-vat-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.finance-vat-header h2 {
  margin: 0;
}

.finance-vat-header .muted {
  margin: 4px 0 0;
  max-width: 720px;
}

.finance-vat-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.finance-vat-summary.hidden,
.finance-vat-tables.hidden {
  display: none;
}

.finance-vat-summary-card {
  border: 1px solid var(--line, #d9dee3);
  border-radius: 6px;
  padding: 12px 14px;
}

.finance-vat-summary-card strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.finance-vat-summary-declaration {
  border-color: #d0d5dd;
}

.finance-vat-summary-declaration.is-credit {
  border-color: #2f7d4f;
  background: rgba(47, 125, 79, .08);
}

.finance-vat-summary-declaration.is-credit strong {
  color: #1f7a3d;
}

.finance-vat-summary-declaration.is-payable {
  border-color: #c0392b;
  background: rgba(192, 57, 43, .08);
}

.finance-vat-summary-declaration.is-payable strong {
  color: #c0392b;
}

.finance-vat-sign {
  font-weight: 700;
}

.finance-vat-tables {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
}

.finance-vat-table-block h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.finance-vat-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line, #d9dee3);
  border-radius: 4px;
}

.finance-vat-table {
  width: 100%;
  border-collapse: collapse;
}

.finance-vat-table th,
.finance-vat-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line, #e5e7eb);
  vertical-align: middle;
  line-height: 1.2;
}

.finance-vat-table th {
  background: #111;
  color: #fff;
  text-align: left;
  font-size: 11px;
  font-weight: 800;
}

.finance-vat-table tr:last-child td {
  border-bottom: 0;
}

.finance-vat-table tfoot td {
  font-weight: 800;
  border-top: 2px solid #111;
}

.finance-vat-table .number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.orders-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.orders-status-cell > .orders-status {
  margin: 0 4px 4px 0;
}

.orders-status {
  display: inline-block;
  min-height: 20px;
  padding: 3px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.orders-status[data-status="ordered"] {
  background: #f2f4f7;
  color: #344054;
}

.orders-status[data-status="confirmed"] {
  background: #e5f6e8;
  color: #1f6d2d;
}


/* Shop ellenőrzőlista – közös ACTUAL Extra adatok */
.checklist-sql-group-label {
  padding: 9px 4px 6px;
  color: #59636a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-bottom: 1px solid #e5e8ea;
}

.checklist-sql-facts {
  grid-column: 1 / -1;
  white-space: pre-line;
  color: #667085;
  font-size: 10px !important;
  line-height: 1.45 !important;
  padding: 0 4px 8px 30px;
}

.checklist-sql-facts[hidden] {
  display: none;
}

.checklist-common-extra-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 4px;
  border-bottom: 1px solid #e5e8ea;
}

.checklist-common-extra-actions button {
  flex: 0 0 auto;
}

.checklist-common-extra-actions span {
  min-width: 0;
  font-size: 11px;
  line-height: 1.4;
}

@media (max-width: 760px) {
  .checklist-common-extra-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

/* ============== Feladatok (belső kommunikáció, 1. ütem) ============== */

.tasks-header { margin-bottom: 20px; }

.tasks-login-gate { display: flex; justify-content: center; padding: 32px 0; }

.tasks-login-form {
  width: 100%;
  max-width: 360px;
  display: grid;
  gap: 10px;
}
.tasks-login-form label { font-weight: 800; font-size: 13px; }
.tasks-login-form input {
  border: 1px solid #ccd1d6;
  border-radius: 12px;
  padding: 12px 14px;
  color: #181818;
  background: #fff;
}
.tasks-login-form button { margin-top: 6px; }

.tasks-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tasks-current-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
}

.tasks-filters {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eceef0;
}
.tasks-filters select {
  border: 1px solid #ccd1d6;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  color: #181818;
}
.tasks-filter-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #444;
}

.tasks-list { display: grid; gap: 12px; }

.task-card {
  border: 1px solid #e5e7eb;
  border-left: 4px solid #cfd4d8;
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
}
.task-card.priority-high { border-left-color: #d64545; }
.task-card.priority-normal { border-left-color: #f36f21; }
.task-card.priority-low { border-left-color: #9aa4ab; }
.task-card.task-card-overdue { background: #fff6f5; }

.task-card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  flex-wrap: wrap;
}

.task-card-title {
  margin: 0;
  font-size: 16px;
  cursor: pointer;
}
.task-card-title:hover { text-decoration: underline; }

.task-card-badges { display: flex; gap: 6px; flex-wrap: wrap; }

.task-badge {
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.task-badge-status-todo { background: #eceff1; color: #546e7a; }
.task-badge-status-in_progress { background: #fff3e0; color: #f36f21; }
.task-badge-status-done { background: #e8f5e9; color: #2e7d32; }
.task-badge-status-cancelled { background: #f1f1f1; color: #8a8a8a; }
.task-badge-priority-low { background: #f1f3f4; color: #666; }
.task-badge-priority-normal { background: #eef2ff; color: #3949ab; }
.task-badge-priority-high { background: #fdecea; color: #c62828; }
.task-badge-overdue { background: #d64545; color: #fff; }

.task-card-description {
  margin: 10px 0 0;
  color: #3c4247;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.task-card-meta {
  margin-top: 10px;
  color: #6a747b;
  font-size: 11px;
}

.task-card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.task-card-status-select {
  border: 1px solid #ccd1d6;
  border-radius: 10px;
  padding: 7px 10px;
  background: #fff;
  color: #181818;
  font-size: 12px;
}

.task-dialog {
  width: min(560px, 92vw);
  border: 0;
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
}
.task-dialog::backdrop { background: rgba(20, 22, 24, .5); }

.task-dialog-form { display: grid; gap: 10px; padding: 22px 24px; }
.task-dialog-form label { font-weight: 800; font-size: 13px; }
.task-dialog-form input,
.task-dialog-form select {
  width: 100%;
  border: 1px solid #ccd1d6;
  border-radius: 12px;
  padding: 11px 13px;
  color: #181818;
  background: #fff;
}

.task-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.task-dialog-header h3 { margin: 0; }
.task-dialog-header button {
  border: 0;
  background: transparent;
  color: #666;
  font-size: 22px;
  line-height: 1;
  padding: 2px 6px;
  cursor: pointer;
}

.task-dialog-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.task-dialog-row label { display: grid; gap: 6px; }

.task-dialog-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.task-dialog-actions-spacer { flex: 1; }

button.danger { background: #d64545; color: #fff; }

#tasksState.ok,
#taskDialogState.ok,
#settingsUserDialogState.ok,
#settingsUsersState.ok { color: #176c3c; }
#tasksState.error,
#taskDialogState.error,
#settingsUserDialogState.error,
#settingsUsersState.error { color: #a13f23; }

.task-dialog-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
}
.task-dialog-checkbox input { width: auto; }

#settingsUserModulesFieldset {
  border: 1px solid #dfe2e5;
  border-radius: 10px;
  padding: 10px 14px;
}
#settingsUserModulesFieldset legend {
  font-size: 12px;
  font-weight: 800;
  width: auto;
  padding: 0 6px;
}
.settings-user-modules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
}
.settings-user-modules label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  font-weight: 500;
  font-size: 13px;
  text-align: left;
}
.settings-user-modules label input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
}

.settings-user-modules-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.settings-user-modules-cell .badge { font-weight: 500; }

.settings-user-actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 700px) {
  .task-dialog-row { grid-template-columns: 1fr; }
  .tasks-toolbar { align-items: stretch; flex-direction: column; }
  .settings-user-modules { grid-template-columns: 1fr; }
}


/* Szállítási hely: .M = Mosnov. A termék minden listában kék vizuális jelölést kap. */
.shipping-origin-mosnov {
  --wsa-mosnov-blue: #0b5ed7;
  --wsa-mosnov-bg: rgba(13, 110, 253, .065);
}

.product-suggestion.shipping-origin-mosnov {
  border-left: 3px solid var(--wsa-mosnov-blue);
  background: var(--wsa-mosnov-bg);
}

.product-suggestion.shipping-origin-mosnov .product-suggestion-primary,
.product-suggestion.shipping-origin-mosnov .product-suggestion-secondary,
.product-suggestion.shipping-origin-mosnov .product-suggestion-meta {
  color: var(--wsa-mosnov-blue);
}

.product-panel.shipping-origin-mosnov .product-title-heading,
.product-panel.shipping-origin-mosnov #resultArticleNumber,
.product-panel.shipping-origin-mosnov #contextWebshopName,
.product-panel.shipping-origin-mosnov #contextInternalName,
.product-panel.shipping-origin-mosnov #resultName,
.product-panel.shipping-origin-mosnov #stihlPriceListName,
.product-panel.shipping-origin-mosnov #contextShippingOrigin {
  color: var(--wsa-mosnov-blue);
}

tr.shipping-origin-mosnov > td {
  background: var(--wsa-mosnov-bg);
}

tr.shipping-origin-mosnov .order-list-article,
tr.shipping-origin-mosnov .order-list-name,
tr.shipping-origin-mosnov .order-list-order-article,
tr.shipping-origin-mosnov .orders-article,
tr.shipping-origin-mosnov .orders-name {
  color: var(--wsa-mosnov-blue);
}

tr.shipping-origin-mosnov > td:first-child {
  box-shadow: inset 3px 0 0 var(--wsa-mosnov-blue);
}

.finance-nav-workspace { gap: 14px; }

.finance-nav-workspace.hidden { display: none; }

.finance-nav-header h2 { margin: 0; }

.finance-nav-header .muted { margin: 4px 0 0; max-width: 760px; }

.finance-nav-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.finance-nav-filter label {
  font-size: 12px;
  font-weight: 700;
  color: #40484e;
}

.finance-nav-filter .finance-nav-only-missing {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 400;
}

.finance-nav-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.finance-nav-summary.hidden,
.finance-nav-tables.hidden {
  display: none;
}

.finance-nav-summary-card {
  border: 1px solid var(--line, #d9dee3);
  border-radius: 6px;
  padding: 12px 14px;
}

.finance-nav-summary-card strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.finance-nav-summary-missing {
  border-color: #f36f21;
  background: rgba(243, 111, 33, .06);
}

.finance-nav-tables {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.finance-nav-table-block h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.finance-nav-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line, #d9dee3);
  border-radius: 4px;
}

.finance-nav-table {
  width: 100%;
  border-collapse: collapse;
}

.finance-nav-table th,
.finance-nav-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line, #e5e7eb);
  vertical-align: middle;
  line-height: 1.2;
  white-space: nowrap;
}

.finance-nav-table th {
  background: #111;
  color: #fff;
  text-align: left;
  font-size: 11px;
  font-weight: 800;
}

.finance-nav-table tr:last-child td {
  border-bottom: 0;
}

.finance-nav-table .number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.finance-nav-status {
  display: inline-block;
  min-height: 20px;
  padding: 3px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.finance-nav-status[data-status="matched"] {
  background: #e5f6e8;
  color: #1f6d2d;
}

.finance-nav-status[data-status="missing"] {
  background: #fdecea;
  color: #a13f23;
}

/* Szállítói számlák menü */
.finance-suppliers-workspace {
  gap: 14px;
}

.finance-suppliers-workspace.hidden {
  display: none;
}

.finance-suppliers-table td.negative {
  color: #a13f23;
}

.finance-suppliers-number strong {
  font-weight: 800;
}

.finance-suppliers-operation {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 3px;
  background: #f3ecfa;
  color: #5b2a86;
  font-size: 10px;
  font-weight: 800;
}

.finance-suppliers-supplier strong,
.finance-suppliers-supplier small {
  display: block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.finance-suppliers-supplier small {
  color: #667085;
  font-size: 11px;
}

/* Fizetési mód: színes ikon + felirat */
.finance-pay {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.finance-pay .bi {
  font-size: 13px;
}

.finance-pay[data-method="CASH"],
.finance-pay[data-method="COD_CASH"] {
  background: #e5f6e8;
  color: #1f6d2d;
}

.finance-pay[data-method="CARD"],
.finance-pay[data-method="COD_CARD"] {
  background: #e6f0ff;
  color: #1756a9;
}

.finance-pay[data-method="TRANSFER"] {
  background: #fff0d5;
  color: #b55200;
}

.finance-pay[data-method="VOUCHER"] {
  background: #f3ecfa;
  color: #5b2a86;
}

.finance-pay[data-method="OTHER"] {
  background: #f2f4f7;
  color: #344054;
}

.finance-pay[data-method="NONE"] {
  border: 1px dashed #d0d5dd;
  background: #fff;
  color: #98a2b3;
  font-weight: 700;
}

/* Kattintható fizetési mód + kézi beállítás ablak */
.finance-pay-button {
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

.finance-pay-button:hover {
  filter: brightness(0.95);
  box-shadow: 0 0 0 2px rgba(243, 111, 33, 0.35);
}

.finance-pay-manual {
  margin-left: 2px;
  font-size: 9px !important;
  opacity: 0.75;
}

.finance-pay-popover {
  position: fixed;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 340px;
  max-height: calc(100vh - 16px);
  overflow-y: auto;
  padding: 12px 14px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.2);
}

.finance-pay-popover small {
  color: #667085;
  font-size: 11px;
}

.finance-pay-scopes {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.finance-pay-scopes label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 0;
  text-align: left;
  cursor: pointer;
}

.finance-pay-scopes input[type="radio"] {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
}

.finance-pay-hint {
  min-height: 0;
  color: #a13f23 !important;
}

.finance-pay-section {
  margin-top: 2px;
  color: #475467;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.finance-pay-choice.is-current {
  box-shadow: 0 0 0 2px #f36f21;
}

.finance-pay-due {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.finance-due-choice {
  padding: 4px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 4px;
  background: #fff;
  color: #344054;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.finance-due-choice:hover {
  border-color: #f36f21;
  color: #f36f21;
}

.finance-due-choice.is-current {
  border-color: #f36f21;
  background: #fff0e6;
  color: #b55200;
}

.finance-pay-due-custom {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.finance-pay-due-custom.hidden {
  display: none;
}

.finance-pay-due-custom input {
  width: 110px;
  padding: 3px 6px;
  border: 1px solid #d0d5dd;
  border-radius: 4px;
  font-size: 12px;
}

.finance-pay-due-custom input[type="number"] {
  width: 70px;
}

.finance-due-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  white-space: nowrap;
  cursor: pointer;
}

.finance-due-button:hover {
  background: #f2f4f7;
  box-shadow: 0 0 0 2px rgba(243, 111, 33, 0.35);
}

.finance-due-button[data-source="NONE"] {
  border: 1px dashed #d0d5dd;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 700;
}

/* Rendezhető oszlopfejlécek */
.finance-suppliers-table th .finance-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.finance-suppliers-table th.number .finance-sort-button {
  width: 100%;
  justify-content: flex-end;
}

.finance-suppliers-table th .finance-sort-button:hover {
  color: #f36f21;
}

.finance-sort-icon {
  font-size: 10px;
  opacity: 0.45;
}

.finance-sort-icon.is-active {
  color: #f36f21;
  opacity: 1;
}

.finance-suppliers-table th[aria-sort="ascending"],
.finance-suppliers-table th[aria-sort="descending"] {
  box-shadow: inset 0 -2px 0 #f36f21;
}

.finance-pay-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.finance-pay-choice {
  border: 0;
  font-family: inherit;
  cursor: pointer;
  padding: 5px 10px 5px 8px;
}

.finance-pay-choice:hover {
  filter: brightness(0.93);
}

.finance-pay-actions {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 6px;
  border-top: 1px solid #e5e7eb;
}

.finance-pay-clear {
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: #a13f23;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.finance-pay-clear:hover {
  text-decoration: underline;
}

/* Számlaszám link + a számla tételei felugró ablak */
.finance-invoice-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: #0b5ed7;
  font-family: inherit;
  font-size: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.finance-invoice-link:hover {
  text-decoration: underline;
}

.finance-invoice-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(16, 24, 40, 0.5);
}

.finance-invoice-modal-panel {
  width: min(1040px, 100%);
  max-height: 85vh;
  overflow: auto;
  padding: 18px 20px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.25);
}

.finance-invoice-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.finance-invoice-modal-header h2 {
  margin: 0;
  font-size: 18px;
}

.finance-invoice-modal-header small {
  color: #667085;
  font-size: 12px;
}

.finance-invoice-modal-close {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #475467;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.finance-invoice-modal-close:hover {
  background: #f2f4f7;
}

.finance-invoice-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px 16px;
  margin-bottom: 14px;
}

.finance-invoice-meta-item small {
  display: block;
  color: #667085;
  font-size: 11px;
}

.finance-invoice-meta-item strong {
  font-size: 13px;
}

.finance-invoice-table {
  width: 100%;
  border-collapse: collapse;
}

.finance-invoice-table th,
.finance-invoice-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  font-size: 13px;
  vertical-align: top;
}

.finance-invoice-table th {
  background: #111;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.finance-invoice-table .number {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.finance-invoice-table .negative {
  color: #a13f23;
}

.finance-invoice-description strong,
.finance-invoice-description small {
  display: block;
}

.finance-invoice-description small {
  color: #667085;
  font-size: 11px;
}

.finance-invoice-table tfoot td {
  border-top: 2px solid #d0d5dd;
  border-bottom: 0;
  font-weight: 800;
}


.order-list-manual-table .order-list-manual-remove {
  margin-top: 2px;
  padding: 2px 6px;
  font-size: 10px;
}

.order-list-status[data-status="b2b_cart"] {
  background: #fdeaf3;
  color: #9c1f5b;
  font-weight: 700;
}


.order-list-b2b-state {
  color: #667085;
  font-size: 11px;
}

.order-list-b2b-button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 5px;
  padding: 2px 6px 2px 8px;
  border: 0;
  border-radius: 4px;
  background: #f36f21;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
  cursor: pointer;
  vertical-align: middle;
}

.order-list-b2b-button svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.order-list-b2b-button:hover:not(:disabled) {
  background: #d85f16;
}

.order-list-b2b-button:disabled {
  background: #e2e5e8;
  color: #8a939a;
  cursor: not-allowed;
}

.order-list-b2b-badge {
  display: block;
  width: fit-content;
  margin-top: 2px;
}

.order-list-b2b-gate {
  display: none;
}

.order-list-b2b-gated > *:not(.order-list-b2b-gate) {
  display: none !important;
}

.order-list-b2b-gated > .order-list-b2b-gate {
  display: block;
  max-width: 560px;
  margin: 48px auto;
  padding: 24px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  background: #fff;
}

.order-list-b2b-gate h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.order-list-b2b-gate p {
  margin: 0 0 8px;
}

.order-list-b2b-gate-steps {
  color: #667085;
  font-size: 13px;
}

.orders-table tr.orders-group-start > td {
  border-top: 2px solid #d0d5dd;
}

.orders-table tbody tr.orders-group-start:first-child > td {
  border-top: 0;
}

.orders-article .order-list-code-wrap {
  flex-wrap: nowrap;
}

.orders-type {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.orders-type[data-type="mom"] {
  background: #fff0d5;
  color: #9a4b00;
}

.orders-type[data-type="customer"] {
  background: #e6f0ff;
  color: #1756a9;
}

.orders-type[data-type="service"] {
  background: #f3ecfa;
  color: #5b2a86;
}

.orders-type[data-type="custom"] {
  background: #f2f4f7;
  color: #344054;
}

.orders-document strong,
.orders-document small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.orders-document small {
  color: #667085;
  font-size: 11px;
}

.orders-search-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid #d0d5dd;
  border-radius: 4px;
  background: #fff;
  color: #475467;
  cursor: pointer;
}

.orders-search-button svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.orders-search-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.orders-search-button:hover:not(:disabled) {
  border-color: #f36f21;
  color: #f36f21;
}

.order-list-b2b-cart-button {
  margin-left: 6px;
  padding: 1px 8px;
  border: 1px solid #f36f21;
  border-radius: 4px;
  background: #fff;
  color: #f36f21;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  cursor: pointer;
  vertical-align: middle;
}

.order-list-b2b-cart-button:hover {
  background: #f36f21;
  color: #fff;
}

.order-list-b2b-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(16, 24, 40, 0.5);
}

.order-list-b2b-modal-panel {
  width: min(720px, 100%);
  max-height: 80vh;
  overflow: auto;
  padding: 18px 20px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.25);
}

.order-list-b2b-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.order-list-b2b-modal-header h2 {
  margin: 0;
  font-size: 18px;
}

.order-list-b2b-modal-close {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #475467;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.order-list-b2b-modal-close:hover {
  background: #f2f4f7;
}

.order-list-b2b-modal-table {
  width: 100%;
  border-collapse: collapse;
}

.order-list-b2b-modal-table th,
.order-list-b2b-modal-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  font-size: 13px;
}

.order-list-b2b-modal-table th {
  background: #111;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.order-list-b2b-modal-table .number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.order-list-b2b-modal-summary {
  margin: 10px 0 0;
  color: #475467;
  font-size: 12px;
}

/* Saját felugró ablakok (static/dialogs.js) */
.wsa-dialog {
  width: min(460px, calc(100vw - 32px));
  padding: 20px 22px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #1d2939;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.3);
}

.wsa-dialog::backdrop {
  background: rgba(16, 24, 40, 0.5);
}

.wsa-dialog-title {
  margin: 0 0 10px;
  font-size: 18px;
  border-bottom: 2px solid #f36f21;
  padding-bottom: 8px;
}

.wsa-dialog-message {
  max-height: 55vh;
  overflow: auto;
  white-space: pre-line;
  line-height: 1.5;
}

.wsa-dialog-input {
  width: 100%;
  margin-top: 12px;
  padding: 8px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  font-size: 16px;
}

.wsa-dialog-input:focus {
  outline: 2px solid #f36f21;
  outline-offset: 0;
}

.wsa-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.wsa-dialog-danger {
  background: #b42318;
  border-color: #b42318;
  color: #fff;
}

/* Szállítói számlák szűrő: legördülő, jelölőnégyzetes választók */
.finance-suppliers-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.finance-filter {
  position: relative;
}

.finance-filter-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 4px;
  background: #fff;
  color: #344054;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  cursor: pointer;
}

.finance-filter-trigger:hover,
.finance-filter-trigger[aria-expanded="true"] {
  border-color: #f36f21;
  background: #fff;
  color: #344054;
}

.finance-filter-name {
  color: #667085;
}

.finance-filter-value {
  font-weight: 700;
  color: #1d2939;
}

.finance-filter-trigger .bi {
  font-size: 11px;
  color: #667085;
}

.finance-filter-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 60;
  min-width: 100%;
  max-height: 70vh;
  overflow: auto;
  padding: 6px;
  border: 1px solid #d0d5dd;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.16);
}

.finance-filter-panel.hidden {
  display: none;
}

.finance-filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 8px;
  border-radius: 3px;
  color: #1d2939;
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
  cursor: pointer;
}

.finance-filter-option:hover {
  background: #f2f4f7;
}

.finance-suppliers-filter .finance-filter-option input[type="checkbox"],
.finance-suppliers-filter .finance-filter-option input[type="radio"] {
  flex: 0 0 15px;
  width: 15px;
  min-width: 15px;
  height: 15px;
  padding: 0;
  margin: 0;
  accent-color: #f36f21;
  cursor: pointer;
}

.finance-filter-dates {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  color: #667085;
  font-size: 12px;
}

.finance-filter-dates input[type="date"] {
  width: 122px;
  height: 26px;
  padding: 0 6px;
  font-size: 12px;
}

.finance-filter-refresh {
  padding: 5px 14px;
  border-radius: 4px;
  font-size: 13px;
}

.finance-vat-controls {
  align-items: center;
}

/* Főoldal (dashboard) */
.dashboard-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-header h2 {
  margin: 0;
}

.dashboard-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.dashboard-empty {
  display: none;
}

.dashboard-grid[data-empty="true"] + .dashboard-empty {
  display: block;
}

.dashboard-card {
  padding: 14px 16px;
  border: 1px solid #dfe4e8;
  border-radius: 4px;
  background: #fff;
}

.dashboard-card.is-link {
  cursor: pointer;
}

.dashboard-card.is-link:hover,
.dashboard-card.is-link:focus-visible {
  border-color: #f36f21;
  outline: none;
}

.dashboard-card.has-error {
  border-color: #c0392b;
}

.dashboard-card header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #667085;
}

.dashboard-card h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #e25c20;
}

.dashboard-value {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.dashboard-note {
  color: #667085;
}

.dashboard-details {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  margin: 10px 0 0;
  font-size: 13px;
}

.dashboard-details dt {
  font-weight: 400;
  color: #667085;
}

.dashboard-details dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.dashboard-message {
  margin: 8px 0 0;
  font-size: 12px;
}

.dashboard-message:empty {
  display: none;
}

.dashboard-message.error {
  color: #c0392b;
}

/* Fejléc-kereső: élő ajánlatok, nem aktív termékek kapcsolója, B2B ellenőrzés */
.product-suggestion-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px 12px;
  border-bottom: 1px solid #e3e8ec;
  background: #f5f7f8;
  color: #40484e;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
}

.product-suggestion-toolbar input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #f36f21;
}

.product-suggestion.is-inactive .product-suggestion-primary,
.product-suggestion.is-inactive .product-suggestion-secondary {
  color: #98a2b3;
}

.product-b2b-notice {
  margin-top: 8px;
  padding: 6px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 4px;
  background: #f5f7f8;
  color: #40484e;
  font-size: 13px;
  font-weight: 700;
}

.product-b2b-notice.hidden {
  display: none;
}

.product-b2b-notice.is-ok {
  border-color: #2f7d4f;
  background: rgba(47, 125, 79, .08);
  color: #1f7a3d;
}

.product-b2b-notice.is-warning {
  border-color: #b42318;
  background: #fff0ee;
  color: #b42318;
}

.product-suggestions {
  overflow-y: auto;
}

/* B2B kártya az "Árak és készlet" blokkban */
.product-middle-list .b2b-card {
  align-items: start;
  padding-top: 12px;
  padding-bottom: 12px;
}

.product-middle-list .b2b-card .product-b2b-notice {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: right;
  font-size: 13px;
}

.b2b-card .b2b-status {
  display: block;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.b2b-card .product-b2b-notice.is-ok .b2b-status {
  color: #1f7a3d;
}

.b2b-card .product-b2b-notice.is-warning .b2b-status {
  color: #b42318;
}

.b2b-card .product-b2b-notice.is-info .b2b-status {
  color: #667085;
  font-weight: 400;
}

.b2b-card .b2b-price {
  margin-top: 6px;
  font-size: 12px;
}

.b2b-card .b2b-price summary {
  color: #667085;
  cursor: pointer;
}

.b2b-card .b2b-price strong {
  display: block;
  margin-top: 2px;
  font-size: 16px;
  color: #1d2939;
}

.product-middle-list .storage-value {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 4px 8px;
}

/* Termékadatok átrendezés: cikkcsoport a cím alatt, CikkID, három ár egy sorban, További adatok */
.product-title-group {
  margin: 2px 0 0;
  color: #667085;
  font-size: 13px;
  font-weight: 400;
}

.product-title-group.hidden {
  display: none;
}

/* A CikkID a Termékadat blokk jobb alsó sarkában, a táblázat elrendezését nem érinti. */
.product-panel {
  position: relative;
}

.product-cikkid {
  position: absolute;
  right: 12px;
  bottom: 5px;
  font-size: 10px;
  line-height: 1;
}

.product-middle-list .price-row-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid #eef1f3;
}

.product-middle-list .price-row-three .price-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 58px;
  padding: 10px 12px;
  border-bottom: 0;
}

.product-middle-list .price-row-three .price-card + .price-card {
  border-left: 1px solid #eef1f3;
}

.product-middle-list .price-row-three .price-value {
  align-items: flex-start;
  text-align: left;
}

.product-middle-list .price-row-three .price-value > strong {
  font-size: 13px !important;
}

/* A Bolti ár legyen a kiemelt, nagyobb érték; az alatta lévő három ár
   (Listaár SSC/ACTUAL, Webshop ár) ehhez képest kisebb. */
.product-middle-list .store-price-highlight .price-value > strong {
  font-size: 19px !important;
}

.product-more-panel.hidden {
  display: none;
}

.product-more-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.b2b-card .b2b-price small {
  display: block;
  color: #667085;
  font-size: 11px;
}

/* A További adatok blokk az oldal legalján van (a workbench flex-oszlop sorrendjében utolsó). */
.workbench > .product-more-panel {
  order: 9;
  align-self: stretch;
  width: 100%;
}

/* M/O blokk: minimum/optimum készlet és a cikkraktár tulajdonság, ugyanaz a
   besorolás, mint a Rendelési listák készletezési prioritás szűrőjében. */
.product-middle-list .mo-card {
  align-items: start;
  padding-top: 12px;
  padding-bottom: 12px;
}

.product-middle-list .mo-value {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 0;
  text-align: right;
}

.product-middle-list .mo-numbers {
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: #40484e;
}

.product-middle-list .mo-numbers strong {
  font-size: 15px;
  font-weight: 800;
}

.product-middle-list .mo-value > small {
  font-size: 11px;
  max-width: 220px;
  overflow-wrap: anywhere;
}

/* Belső ügyek: Jelenléti ív, Szabadság, Jelenléti összesítő */
.att-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.att-header h2 {
  margin: 0;
}

.att-header .muted {
  max-width: 760px;
  margin: 4px 0 0;
}

.att-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}

.att-controls input[type="month"] {
  width: 170px;
}

.att-year {
  min-width: 70px;
  text-align: center;
  font-size: 18px;
}

.att-user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  font-size: 13px;
}

.att-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.att-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border: 1px solid #dfe4e8;
  border-radius: 4px;
  background: #fff;
}

.att-card-label {
  color: #e25c20;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.att-card-value {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.att-table-wrap {
  overflow-x: auto;
  margin-bottom: 14px;
  border: 1px solid #dfe4e8;
  border-radius: 4px;
  background: #fff;
}

.att-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.att-table th,
.att-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #eef1f3;
  text-align: left;
  vertical-align: middle;
}

.att-table thead th {
  background: #1f2327;
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
}

.att-table .number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.att-table tr.att-saturday td { background: #fbfaf5; }
.att-table tr.att-sunday td,
.att-table tr.att-holiday td { background: #f2f4f7; color: #667085; }
.att-table tr.att-today td { box-shadow: inset 0 2px 0 #f36f21, inset 0 -2px 0 #f36f21; }

.att-missing {
  color: #b42318;
  font-weight: 700;
}

.att-tag {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid #f3a46e;
  border-radius: 4px;
  background: #fff8f2;
  color: #b84912;
  font-size: 11px;
}

.att-table td.att-actions {
  /* táblázatcella marad (a flex a cellát kiemelte a táblából: törött sorszegély, hiányzó jobb oldal) */
  text-align: right;
  white-space: nowrap;
}
.att-table td.att-actions > * {
  margin-left: 6px;
  vertical-align: middle;
}

.att-status-pending td { background: #fffbeb; }
.att-status-rejected td { color: #98a2b3; text-decoration: line-through; }

.att-subtitle {
  margin: 18px 0 8px;
  font-size: 15px;
}

.att-form {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid #dfe4e8;
  border-radius: 4px;
  background: #fff;
}

.att-form h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.att-form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.att-form-row label,
.att-form label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  font-weight: 700;
  color: #40484e;
}

.att-grow {
  flex: 1 1 220px;
}

.att-admin {
  margin-top: 8px;
}

.att-block {
  margin-bottom: 10px;
  padding: 8px 12px;
  border: 1px solid #dfe4e8;
  border-radius: 4px;
  background: #fff;
}

.att-block > summary {
  cursor: pointer;
  font-weight: 700;
}

.att-count {
  color: #e25c20;
}

.att-employees {
  margin: 10px 0;
  border: 0;
  padding: 0;
}

.att-user-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 6px;
}

.att-user-checks label,
.att-employees label {
  flex-direction: row;
  align-items: center;
  font-weight: 400;
}

.att-num {
  width: 90px;
  text-align: right;
}

.att-export {
  align-self: center;
  padding: 5px 12px;
  border: 1px solid #f36f21;
  border-radius: 4px;
  color: #b84912;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.att-export.hidden {
  display: none;
}

/* Havi rács (összesítő) */
.att-grid {
  width: auto;
  min-width: 100%;
}

.att-grid th,
.att-grid td {
  padding: 4px 5px;
  text-align: center;
  font-size: 12px;
}

.att-grid .att-sticky {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 140px;
  background: #fff;
  color: #1d2939;
  text-align: left;
  white-space: nowrap;
}

.att-grid thead .att-sticky {
  background: #1f2327;
  color: #fff;
}

.att-grid th.att-day {
  min-width: 26px;
}

.att-grid th.att-day small {
  display: block;
  color: #cbd2d9;
  font-size: 9px;
}

.att-grid td.att-saturday,
.att-grid th.att-saturday { background: #fbfaf5; }
.att-grid td.att-sunday,
.att-grid td.att-holiday { background: #f2f4f7; }
.att-grid thead th.att-saturday,
.att-grid thead th.att-sunday,
.att-grid thead th.att-holiday { background: #3a4047; }

.att-grid td.att-code-work { color: #1d2939; font-weight: 700; }
.att-grid td.att-code-leave,
.att-grid td.att-code-leave-saturday { background: #e5f6e8; color: #1f6d2d; font-weight: 700; }
.att-grid td.att-code-sick { background: #fff0ee; color: #b42318; font-weight: 700; }
.att-grid td.att-code-other { background: #e6f0ff; color: #1756a9; font-weight: 700; }
.att-grid .att-total { background: #f8f9f9; font-weight: 700; }
.att-grid thead .att-total { background: #1f2327; }

.att-workspace .att-controls input[type="month"] {
  width: 180px;
  min-width: 0;
  flex: 0 0 180px;
}

.att-workspace .att-form-row input[type="date"],
.att-workspace .att-form-row select {
  width: auto;
  min-width: 150px;
}

.att-workspace .att-form-row input[type="text"] {
  width: 100%;
}

/* Jelenléti ív: a szállítói számlák táblázatához hasonló kinézet, ikonos műveleti gombok */
.att-table.finance-nav-table td {
  padding: 6px 10px;
}

.att-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #d0d5dd;
  border-radius: 4px;
  background: #fff;
  color: #475467;
  font-size: 14px;
  cursor: pointer;
}

.att-icon-btn:hover,
.att-icon-btn:focus-visible {
  border-color: #f36f21;
  color: #b84912;
  background: #fff8f2;
  outline: none;
}

.att-icon-btn.is-primary {
  border-color: #f36f21;
  background: #f36f21;
  color: #fff;
}

.att-icon-btn.is-primary:hover {
  background: #e25c20;
  color: #fff;
}

.att-icon-btn.is-ok:hover {
  border-color: #2f7d4f;
  background: #e5f6e8;
  color: #1f6d2d;
}

.att-icon-btn.is-danger:hover {
  border-color: #b42318;
  background: #fff0ee;
  color: #b42318;
}

.att-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #98a2b3;
}

.att-badge {
  display: inline-block;
  padding: 3px 6px;
  border-radius: 3px;
  background: #f2f4f7;
  color: #344054;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.att-badge[data-type="work"] { background: #e5f6e8; color: #1f6d2d; }
.att-badge[data-type="leave"] { background: #e6f0ff; color: #1756a9; }
.att-badge[data-type="saturday-absence"] { background: #fff0d5; color: #b55200; }
.att-badge[data-type="sick"],
.att-badge[data-type="missing"] { background: #fff0ee; color: #b42318; }
.att-badge[data-type="pending"] { background: #fff7d6; color: #8a6100; }
.att-badge[data-type="other"] { background: #f3ecfa; color: #5b2a86; }

.att-moved {
  color: #b84912;
  font-size: 12px;
  font-weight: 700;
}

.settings-user-employment {
  margin: 10px 0;
  padding: 8px 12px 10px;
  border: 1px solid #dfe4e8;
  border-radius: 4px;
}

.settings-user-employment legend {
  float: none;
  width: auto;
  padding: 0 6px;
  font-size: 13px;
  font-weight: 700;
}

.att-settle-days {
  margin: 10px 0;
  padding: 8px 12px;
  border: 1px solid #dfe4e8;
  border-radius: 4px;
}

.att-settle-days legend {
  float: none;
  width: auto;
  padding: 0 6px;
  font-size: 13px;
  font-weight: 700;
}

.att-settle-add {
  display: flex;
  gap: 8px;
  align-items: center;
}

.att-settle-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.att-settle-day {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 8px;
  border: 1px solid #eef1f3;
  border-radius: 4px;
  background: #fafbfb;
}

/* Főoldal: bevétel statisztika */
.dashboard-stats {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid #dfe4e8;
  border-radius: 4px;
  background: #fff;
}
.dashboard-stats-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.dashboard-stats-header h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #e25c20;
}
.dashboard-stats-header h3 small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.dashboard-stats-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dashboard-stats-controls .form-select,
.dashboard-stats-controls .form-control { width: auto; border-radius: 4px; }
.dashboard-stats-custom { display: inline-flex; align-items: center; gap: 6px; }
.dashboard-stats-summary { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 12px; font-size: 13px; color: #667085; }
.dashboard-stats-summary strong { color: #1d2327; font-variant-numeric: tabular-nums; }
.dashboard-stats-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 12px; color: #667085; }
.dashboard-stats-legend .swatch { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 2px; vertical-align: -1px; }
.dash-chart {
  position: relative;
  height: 270px;
  margin: 10px 0 40px;
  border-bottom: 1px solid #c9d0d6;
}
.dash-chart.is-pie { height: auto; margin-bottom: 14px; border-bottom: 0; }
.dash-chart svg { display: block; width: 100%; height: 100%; }
.dash-chart.is-pie svg { height: 260px; }
.dash-chart-max {
  position: absolute;
  top: 18px;
  left: 0;
  padding: 0 3px;
  font-size: 11px;
  color: #667085;
  background: rgba(255, 255, 255, .85);
  pointer-events: none;
}
.dash-bars { display: flex; align-items: stretch; gap: 2px; height: 100%; }
.dash-col { flex: 1 1 0; min-width: 3px; display: flex; flex-direction: column; position: relative; }
.dash-col:hover { background: #f3f4f6; }
.dash-dow { flex: none; height: 16px; font-size: 10px; font-weight: 600; text-align: center; color: #667085; }
.dash-dow.is-weekend { color: #c0392b; }
.dash-stack { flex: 1 1 0; display: flex; flex-direction: column; justify-content: flex-end; }
.dash-col .dash-seg { width: 100%; }
.dash-col .dash-label {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 4px;
  font-size: 10px;
  white-space: nowrap;
  color: #667085;
}
.dashboard-stats-controls .dash-type { min-width: 190px; }
.dashboard-stats-table { margin-top: 12px; font-size: 13px; }
.dashboard-stats-table summary { cursor: pointer; color: #667085; }
.dashboard-stats-scroll { max-height: 340px; overflow: auto; }
.dashboard-stats-table td, .dashboard-stats-table th { font-variant-numeric: tabular-nums; }
.dashboard-stats-table td:not(:first-child), .dashboard-stats-table th:not(:first-child) { text-align: right; }
.dashboard-stats-custom.hidden { display: none; }
.dash-access-list { display: grid; gap: 10px; margin: 8px 0; max-height: 55vh; overflow: auto; }
.dash-access-card { margin: 0; padding: 8px 12px; border: 1px solid #dfe4e8; border-radius: 4px; }
.dash-access-card legend { float: none; width: auto; margin: 0; padding: 0 6px; font-size: 13px; font-weight: 700; color: #e25c20; }
.dash-access-user { display: block; font-size: 13px; padding: 2px 0; }
#dashboardAccessButton.hidden { display: none; }

/* B2B statisztika (debug) — kutatóeszköz a /statistics/search feltérképezéséhez. */
.b2b-stats-workspace { gap: 14px; }

.b2b-stats-workspace.hidden { display: none; }

.b2b-stats-header h2 { margin: 0; }

.b2b-stats-header .muted { margin: 4px 0 0; max-width: 820px; }

.b2b-stats-header code {
  padding: 1px 4px;
  border-radius: 3px;
  background: #f1f3f4;
  font-size: 12px;
}

.b2b-stats-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 640px;
}

.b2b-stats-form label {
  font-size: 12px;
  font-weight: 700;
  color: #40484e;
}

.b2b-stats-payload {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line, #d9dee3);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  resize: vertical;
}

.b2b-stats-form button {
  align-self: flex-start;
}

.b2b-stats-result-block.hidden { display: none; }

.b2b-stats-result-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.b2b-stats-result-head h3 { margin: 0; font-size: 14px; }

.b2b-stats-rows.hidden { display: none; }

.b2b-stats-rows { margin-bottom: 14px; }

.b2b-stats-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line, #d9dee3);
  border-radius: 4px;
}

.b2b-stats-table {
  width: 100%;
  border-collapse: collapse;
}

.b2b-stats-table th,
.b2b-stats-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line, #e5e7eb);
  vertical-align: middle;
  line-height: 1.2;
  white-space: nowrap;
}

.b2b-stats-table th {
  background: #111;
  color: #fff;
  text-align: left;
  font-size: 11px;
  font-weight: 800;
}

.b2b-stats-table tr:last-child td { border-bottom: 0; }

.b2b-stats-table tbody tr {
  cursor: pointer;
}

.b2b-stats-table tbody tr:hover {
  background: #f8fafb;
}

.b2b-stats-raw {
  max-height: 60vh;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--line, #d9dee3);
  border-radius: 6px;
  background: #0d1117;
  color: #c9d1d9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* B2B célkövetés — célcsoportok kezelése és (később) a dashboard. */
.b2b-targets-workspace { gap: 14px; }

.b2b-targets-workspace.hidden { display: none; }

.b2b-targets-header h2 { margin: 0; }

.b2b-targets-header .muted { margin: 4px 0 0; max-width: 820px; }

.b2b-targets-header code {
  padding: 1px 4px;
  border-radius: 3px;
  background: #f1f3f4;
  font-size: 12px;
}

.b2b-targets-groups-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.b2b-targets-groups-head h3 { margin: 0; font-size: 15px; }

.b2b-targets-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line, #d9dee3);
  border-radius: 4px;
}

.b2b-targets-table {
  width: 100%;
  border-collapse: collapse;
}

.b2b-targets-table th,
.b2b-targets-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line, #e5e7eb);
  vertical-align: middle;
  line-height: 1.3;
}

.b2b-targets-table th {
  background: #111;
  color: #fff;
  text-align: left;
  font-size: 11px;
  font-weight: 800;
}

.b2b-targets-table tr:last-child td { border-bottom: 0; }

.b2b-targets-table td:last-child {
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.b2b-target-dialog {
  width: min(480px, 92vw);
  padding: 0;
  border: 1px solid var(--line, #d9dee3);
  border-radius: 8px;
}

.b2b-target-dialog::backdrop {
  background: rgba(15, 23, 32, .45);
}

.b2b-target-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px 20px;
}

.b2b-target-form h3 { margin: 0 0 4px; }

.b2b-target-form label {
  font-size: 12px;
  font-weight: 700;
  color: #40484e;
}

.b2b-target-active-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 400;
}

.b2b-target-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

/* B2B célkövetés — Teljesítés kártyák (élő B2B-adatokon). */
.b2b-targets-performance {
  margin-top: 8px;
}

.b2b-targets-performance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.b2b-targets-performance-head h3 { margin: 0; font-size: 15px; }

.b2b-targets-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.b2b-target-card {
  border: 1px solid var(--line, #d9dee3);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
}

.b2b-target-card-error {
  border-color: #e0a1a1;
  background: rgba(192, 57, 43, .05);
}

.b2b-target-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.b2b-target-card-head strong { font-size: 14px; }
.b2b-target-card-head .muted { font-size: 12px; white-space: nowrap; }

.b2b-target-card-error-text {
  margin: 0;
  color: var(--danger, #c0392b);
  font-size: 12px;
}

.b2b-target-card-rows {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.b2b-target-card-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #667085;
}

.b2b-target-card-row strong {
  color: #1d2939;
  font-variant-numeric: tabular-nums;
}

.b2b-target-card-row-main {
  font-size: 13px;
}

.b2b-target-card-row-main strong {
  font-size: 15px;
  font-weight: 800;
}

.b2b-target-progress {
  height: 8px;
  margin-top: 10px;
  border-radius: 4px;
  background: #eef1f3;
  overflow: hidden;
}

.b2b-target-progress-fill {
  height: 100%;
  background: #f36f21;
  transition: width .3s ease;
}

.b2b-target-progress-fill.b2b-target-progress-done {
  background: #2e9b59;
}

.b2b-target-progress-label {
  margin: 4px 0 0;
  font-size: 11px;
}

/* Belső chat */
.chat-badge {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: 4px;
  background: #e25c20;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.chat-badge.hidden { display: none; }
.chat-header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.chat-header h2 { margin: 0; }
.chat-notify { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.chat-layout { display: grid; grid-template-columns: 220px 1fr; gap: 14px; margin-top: 14px; }
.chat-conversations { display: flex; flex-direction: column; gap: 4px; }
.chat-conversation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #dfe4e8;
  border-radius: 4px;
  background: #fff;
  color: #1d2327;
  text-align: left;
  cursor: pointer;
}
.chat-conversation:hover { background: #f3f4f6; }
.chat-conversation.is-active { border-color: #f36f21; background: #fff4ec; font-weight: 600; }
.chat-pane { display: flex; flex-direction: column; min-width: 0; border: 1px solid #dfe4e8; border-radius: 4px; background: #fff; padding: 12px 14px; }
.chat-title { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: #e25c20; }
.chat-messages { display: flex; flex-direction: column; gap: 8px; height: 50vh; min-height: 260px; overflow-y: auto; padding: 4px 2px; }
.chat-message { max-width: 78%; padding: 6px 10px; border: 1px solid #e2e5e8; border-radius: 4px; background: #f6f7f8; align-self: flex-start; }
.chat-message.is-mine { align-self: flex-end; background: #fff4ec; border-color: #f3c9ad; }
.chat-meta { font-size: 11px; color: #667085; }
.chat-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 8px; }
.chat-form textarea { flex: 1; resize: vertical; border-radius: 4px; }
.chat-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2000;
  max-width: 320px;
  padding: 10px 14px;
  border: 1px solid #f36f21;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
  cursor: pointer;
}
.chat-toast.hidden { display: none; }
@media (max-width: 760px) {
  .chat-layout { grid-template-columns: 1fr; }
  .chat-conversations { flex-direction: row; flex-wrap: wrap; }
}

/* GLS címke */
.gls-form { display: grid; gap: 14px; margin-top: 14px; max-width: 900px; }
.gls-card { margin: 0; padding: 10px 14px 14px; border: 1px solid #dfe4e8; border-radius: 4px; background: #fff; }
.gls-card legend { float: none; width: auto; margin: 0; padding: 0 6px; font-size: 13px; font-weight: 700; color: #e25c20; }
.gls-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px 14px; margin-top: 8px; }
.gls-grid label, .gls-search label { display: block; font-size: 12px; color: #667085; margin-bottom: 2px; }
.gls-grid input, .gls-search input, .gls-card select { width: 100%; border-radius: 4px; }
.gls-search { position: relative; }
.gls-results {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  max-height: 280px;
  overflow: auto;
  border: 1px solid #c9d0d6;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
  padding: 4px;
}
.gls-results.hidden { display: none; }
.gls-result { display: block; width: 100%; padding: 6px 8px; border: 0; border-radius: 4px; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.gls-result:hover { background: #fff4ec; }
.gls-radios { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.gls-radios label, .gls-check { display: inline-flex; align-items: center; gap: 6px; margin-right: 18px; }
.gls-check { display: flex; margin: 4px 0; }
#glsAddressBlock.is-optional { opacity: .6; }
#glsAddressBlock.is-disabled { opacity: .5; }
#glsAddressBlock.is-disabled input { background: #f1f3f5; cursor: not-allowed; }
.gls-actions { display: flex; gap: 10px; }
.gls-details { margin: 0; padding-left: 18px; color: #667085; }
.gls-details:empty { display: none; }
#glsCodFields.hidden, #glsAddressPick.hidden, #glsAddressNote.hidden { display: none; }

/* GLS címke: kötelező mezők, hibajelzés, balra rendezett extrák */
.gls-card { text-align: left; }
.gls-field label.is-required::after, .gls-search label.is-required::after { content: " *"; color: #c0392b; font-weight: 700; }
.gls-field input.is-invalid, .gls-field select.is-invalid { border: 2px solid #c0392b; outline: none; background: #fff6f5; }
.gls-error { margin-top: 3px; font-size: 12px; color: #c0392b; }
.gls-extras { display: block; }
.gls-extras .gls-check { display: flex; align-items: center; justify-content: flex-start; gap: 8px; width: 100%; margin: 6px 0; text-align: left; }
.gls-extras .gls-check input, .gls-radios input { width: auto; flex: none; margin: 0; }
.gls-extras .gls-check span { flex: 0 1 auto; }
.gls-actions button:disabled { opacity: .5; cursor: not-allowed; }
.gls-state-ok { color: #2e7d32; }
.gls-field.hidden, #glsCodAccountPick.hidden { display: none; }

/* GLS címke: lépések (fülek), csomagkártyák, költség és összesítés */
.gls-nav { display: flex; justify-content: space-between; margin-top: 12px; }
.gls-parcels { display: grid; gap: 10px; margin: 8px 0 12px; }
.gls-parcel { padding: 10px 12px; border: 1px solid #e2e5e8; border-radius: 4px; background: #fafbfc; }
.gls-parcel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-weight: 700; }
.gls-size { display: inline-block; min-width: 38px; padding: 1px 8px; border-radius: 4px; background: #1d2327; color: #fff; text-align: center; font-weight: 700; }
.gls-size.is-none { background: #c9d0d6; color: #667085; }
.gls-parcel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 14px; }
.gls-point { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.gls-point.hidden { display: none; }
.gls-point-field { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.gls-point-field.is-invalid { opacity: 1; position: static; width: 0; height: 0; }
.gls-extra-row { padding: 8px 0; border-top: 1px solid #eef0f2; }
.gls-extra-row:first-child { border-top: 0; }
.gls-extra-row .gls-parcel-head { margin-bottom: 2px; }

/* GLS csomagkártya: a beviteli mezők ne nyúljanak egymásba */
.gls-parcel-grid .gls-field { min-width: 0; }
.gls-parcel-grid label { display: block; margin-bottom: 2px; font-size: 12px; color: #667085; }
.gls-parcel-grid input { width: 100%; box-sizing: border-box; border-radius: 4px; }

/* GLS tárolt címkék */
.gls-history-tools { gap: 10px; margin-bottom: 8px; }
.gls-history-tools input { flex: 1; max-width: 420px; border-radius: 4px; }
.gls-pdf-link { margin-left: 6px; font-size: 12px; }
.gls-cod-modes { margin-top: 6px; }
.gls-cod-info.is-error { color: #c0392b; }
.gls-pane.hidden { display: none; }

/* GLS címke: valódi fülek és nézetváltó */
.gls-header-row > div:first-child { flex: 1 1 520px; min-width: 0; }
.gls-header-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; }
.gls-views { display: inline-flex; flex: none; border: 1px solid #d5d9dd; border-radius: 4px; overflow: hidden; }
.gls-view { padding: 8px 18px; border: 0; background: #fff; color: #3b4349; font-weight: 600; white-space: nowrap; cursor: pointer; }
.gls-view + .gls-view { border-left: 1px solid #d5d9dd; }
.gls-view:hover { background: #f3f4f6; }
.gls-view.is-active { background: #f36f21; color: #fff; }
.gls-tabs { display: flex; flex-wrap: nowrap; gap: 0; border-bottom: 2px solid #dfe4e8; overflow-x: auto; overflow-y: hidden; }
.gls-tab {
  flex: none;
  margin-bottom: -2px;
  padding: 10px 20px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #3b4349;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.gls-tab:hover:not(:disabled) { background: #f3f4f6; }
.gls-tab.is-active { color: #e25c20; border-bottom-color: #f36f21; }
.gls-tab:disabled, .gls-tab.is-locked { color: #a0a8ae; cursor: not-allowed; }
.gls-tab.has-error:not(.is-active) { color: #c0392b; border-bottom-color: #e0a29b; }
.gls-pane { margin-top: 14px; }
.gls-stored-view { width: 100%; }
.gls-stored-view .gls-card { max-width: none; }
.gls-history-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.gls-history-tools input { flex: 1 1 320px; max-width: 480px; border-radius: 4px; }
.gls-stored-body { width: 100%; }
.gls-summary .finance-nav-table-wrap { margin-bottom: 10px; }
.gls-cost .finance-nav-table-wrap { margin-top: 4px; }
button.finance-nav-status { border: 0; cursor: pointer; }
.finance-nav-status[data-status="pending"] { background: #eef0f2; color: #3b4349; }
.gls-tabbar { display: flex; align-items: flex-end; gap: 12px; }
.gls-tabbar .gls-tabs { flex: 1 1 auto; min-width: 0; }
.gls-tabbar .gls-reset { flex: none; margin-bottom: 6px; white-space: nowrap; }

.gls-highlight { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; padding: 14px 16px; border: 1px solid #e6e8eb; border-left: 4px solid #f36f21; background: #fff; }
.gls-highlight-parcels { display: flex; flex-wrap: wrap; gap: 22px; }
.gls-highlight-parcel { display: flex; align-items: center; gap: 14px; }
.gls-size-badge { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 76px; height: 76px; border-radius: 50%; background: #f36f21; color: #fff; font-size: 32px; font-weight: 800; letter-spacing: 0.5px; box-shadow: 0 0 0 4px #fde3d3; }
.gls-highlight-text { display: flex; flex-direction: column; gap: 2px; white-space: nowrap; }
.gls-highlight-fee { font-size: 26px; font-weight: 800; color: #1f2a30; }
.gls-highlight-total { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; margin-left: auto; white-space: nowrap; }
.gls-highlight-total span { color: #5b666e; font-weight: 600; }
.gls-highlight-total strong { font-size: 36px; font-weight: 800; color: #e25c20; line-height: 1.1; }
.gls-highlight-delivery { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 12px; color: #1f2a30; font-weight: 700; white-space: nowrap; }
.gls-highlight-delivery i { font-size: 40px; line-height: 1; color: #f36f21; }

.gls-vat-note { margin: 0 0 10px; padding: 8px 10px; border-left: 4px solid #f36f21; background: #fff4ec; color: #5a3416; }
.gls-field input[readonly] { background: #f1f3f5; color: #3b4349; cursor: not-allowed; }

.gls-title { display: flex; align-items: center; gap: 14px; }
.gls-logo { height: 40px; width: auto; display: block; }

.gls-box-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0 10px; }
.gls-box-pick label { font-weight: 600; }
.gls-box-pick select { flex: 1 1 280px; max-width: 520px; border-radius: 4px; }
.gls-box-dialog { width: min(860px, 96vw); }
.gls-box-list { margin: 10px 0 14px; max-height: 38vh; overflow: auto; }
.gls-box-form h4 { margin: 0 0 8px; }
.gls-title span { font-family: "STIHLDisplayTitling", "STIHLText", Arial, sans-serif; letter-spacing: .35px; font-size: 2vw; line-height: 1.1; }
.gls-question { margin: 0 0 6px; font-weight: 700; }
#glsVatChoice { margin-bottom: 8px; }
.gls-question.is-required::after { content: " *"; color: #c0392b; font-weight: 700; }
.t-hidden { display: none !important; }
.settings-texts-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 8px; }
.settings-texts-tools input[type="search"] { flex: 1 1 360px; max-width: 520px; border-radius: 4px; }
.settings-texts-input { min-width: 420px; border-radius: 4px; }
#settingsTextsBody .finance-nav-table td, #settingsTextsBody .finance-nav-table th { white-space: nowrap; }
.gls-modes { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.gls-mode { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 170px; padding: 16px 22px; border: 2px solid #d0d5da; border-radius: 4px; background: #fff; color: #3b4349; font-weight: 700; cursor: pointer; }
.gls-mode i { font-size: 44px; line-height: 1; color: #98a2b3; }
.gls-mode input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.gls-mode:hover { border-color: #f6a574; }
.gls-mode:has(input:checked) { border-color: #f36f21; background: #fff4ec; color: #1f2a30; }
.gls-mode:has(input:checked) i { color: #f36f21; }
.gls-mode:has(input:focus-visible) { outline: 2px solid #f36f21; outline-offset: 2px; }
.gls-suggest { position: relative; }
.gls-copy-button { border: 0; background: transparent; padding: 0 4px; color: #667085; cursor: pointer; vertical-align: baseline; }
.gls-copy-button:hover { color: #e25c20; }
.gls-nav button.is-blocked, #glsSubmit:disabled { background: #c9cfd4; border-color: #c9cfd4; color: #fff; cursor: not-allowed; }
.gls-card .gls-point { margin-top: 12px; }
.gls-unas { margin-bottom: 12px; }
.gls-unas-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 18px; margin-top: 6px; }
.gls-unas-key { width: 260px; }
.gls-unas-info { margin-top: 8px; }

/* Napló: bal oldali almenü (a napló kiválasztása) + a kiválasztott napló */
.log-layout {display:grid;grid-template-columns:190px minmax(0, 1fr);gap:20px;align-items:start;}
.log-submenu {display:flex;flex-direction:column;gap:2px;border-right:1px solid #d9dde1;padding-right:12px;position:sticky;top:12px;}
.log-submenu-title {margin:0 0 6px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:#6c757d;}
.log-submenu-item {display:block;width:100%;text-align:left;padding:8px 12px;border:0;border-left:3px solid transparent;border-radius:4px;background:transparent;color:#344054;font-weight:600;cursor:pointer;}
.log-submenu-item:hover {background:#f1f3f4;}
.log-submenu-item.active {border-left-color:#f36f21;background:#fff3ea;color:#111;}
.log-main {min-width:0;}
.log-filters label.hidden {display:none;}
.log-table-wrap {max-height:68vh;overflow:auto;margin-top:12px;}
.log-table td, .log-table th {white-space:nowrap;padding:4px 10px;vertical-align:top;}
.log-table details summary {cursor:pointer;color:#495057;}
.log-table details pre {margin:6px 0 0;padding:8px;background:#f6f7f8;border-radius:4px;font-size:12px;white-space:pre-wrap;max-width:60vw;}
.log-level-warning td {background:#fff8e6;}
.log-level-error td {background:#fdeceb;}
@media (max-width:760px) {.log-layout {grid-template-columns:minmax(0, 1fr);} .log-submenu {flex-direction:row;flex-wrap:wrap;border-right:0;position:static;}}
