.promotions-workspace {
  display: grid;
  gap: 22px;
  padding-top: 34px;
}

.promotions-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.promotions-toolbar .hint {
  margin: 8px 0 0;
}

.promotions-toolbar .quote-button {
  flex: 0 0 auto;
  min-height: 48px;
}

.promotions-status {
  min-height: 1.25em;
  margin: 0;
}

.promotion-groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.promotion-group-button {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 94px;
  padding: 18px;
  border: 1px solid rgba(32, 132, 95, 0.24);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.promotion-group-button:hover,
.promotion-group-button:focus-visible {
  border-color: var(--green);
  box-shadow: 0 12px 30px rgba(32, 132, 95, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.promotion-folder-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 38px;
  border-radius: 7px;
  background: rgba(32, 132, 95, 0.12);
  color: var(--green);
  font-size: 1.3rem;
}

.promotion-group-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.promotion-group-count {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 750;
}

.promotion-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 24px;
  border: 1px dashed rgba(29, 37, 44, 0.2);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
}

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

.promotion-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.36fr) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.promotion-row label {
  color: var(--ink);
  font-weight: 850;
  overflow-wrap: anywhere;
}

.promotion-field {
  width: 100%;
  min-height: 46px;
}

.promotions-name-dialog .quote-actions {
  margin-top: 18px;
}

@media (max-width: 760px) {
  .promotions-toolbar {
    display: grid;
  }

  .promotions-toolbar .quote-button {
    width: 100%;
  }

  .promotion-row {
    grid-template-columns: 1fr;
    gap: 9px;
  }
}

.promotion-editor-shell {
  display: grid;
  gap: 22px;
  padding-top: 26px;
}

.promotion-safety-banner {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 16px 18px;
  border: 1px solid rgba(35, 127, 98, 0.2);
  border-radius: 12px;
  background: rgba(35, 127, 98, 0.07);
  color: var(--ink);
}

.promotion-safety-banner p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.promotion-safety-icon {
  display: grid;
  flex: 0 0 30px;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 900;
}

.promotion-stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.promotion-step {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.promotion-step span {
  display: grid;
  flex: 0 0 28px;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(29, 37, 44, 0.18);
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 900;
}

.promotion-step strong {
  font-size: 0.88rem;
}

.promotion-step.is-active {
  background: rgba(35, 127, 98, 0.1);
  color: var(--green);
}

.promotion-step.is-active span,
.promotion-step.is-complete span {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

#formulario-promocion {
  display: grid;
  gap: 18px;
}

.promotion-editor-step {
  min-height: 410px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.promotion-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 24px;
}

.promotion-section-number {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.promotion-section-heading strong {
  color: var(--ink);
  font-size: 1.25rem;
}

.promotion-section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.promotion-form-grid .field-row {
  margin: 0;
}

.promotion-form-full {
  grid-column: 1 / -1;
}

.promotion-field-help {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.promotion-context-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 14px;
  margin-top: 22px;
  padding: 15px 17px;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: #f6faf8;
}

.promotion-context-card span {
  grid-row: 1 / 3;
  align-self: center;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.promotion-context-card small {
  color: var(--muted);
}

.promotion-target-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.promotion-target-option {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.promotion-target-option.is-selected {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(35, 127, 98, 0.08);
}

.promotion-target-option > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.promotion-target-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(35, 127, 98, 0.1);
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 950;
}

.promotion-target-option strong,
.promotion-target-option small {
  display: block;
}

.promotion-target-option small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.promotion-target-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.65fr) minmax(0, 1fr);
  gap: 20px;
}

.promotion-target-panel#promocion-alcance-codigos {
  grid-template-columns: 1fr;
}

.promotion-product-picker {
  display: grid;
  align-content: start;
  gap: 14px;
}

#promocion-productos {
  min-height: 230px;
}

#promocion-productos option {
  padding: 8px 10px;
}

#promocion-marcas {
  min-height: 210px;
}

#promocion-marcas option {
  padding: 8px 10px;
}

.promotion-readonly-preview {
  align-content: start;
  display: grid;
  gap: 10px;
  min-height: 210px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8faf9;
}

.promotion-readonly-preview > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.promotion-readonly-preview > strong {
  color: var(--green);
  font-size: 1.18rem;
}

.promotion-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.promotion-chip {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(35, 127, 98, 0.1);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 850;
}

.promotion-upload-box {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px dashed rgba(35, 127, 98, 0.38);
  border-radius: 12px;
  background: #f8fbfa;
}

.promotion-upload-box p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.promotion-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

#promocion-archivo-codigos {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.promotion-column-confirmation {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(35, 127, 98, 0.28);
  border-radius: 12px;
  background: rgba(35, 127, 98, 0.055);
}

.promotion-column-confirmation[hidden] {
  display: none;
}

.promotion-column-heading {
  display: grid;
  gap: 5px;
}

.promotion-column-heading > span,
.promotion-column-suggestion > span,
.promotion-column-samples > span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.promotion-column-heading > strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.promotion-column-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.promotion-column-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(220px, 0.75fr);
  gap: 14px;
  align-items: end;
}

.promotion-column-suggestion {
  display: grid;
  gap: 6px;
  min-height: 72px;
  align-content: center;
  padding: 12px 14px;
  border: 1px solid rgba(35, 127, 98, 0.18);
  border-radius: 9px;
  background: #fff;
}

.promotion-column-suggestion strong {
  color: var(--green);
}

.promotion-column-samples {
  display: grid;
  gap: 9px;
}

.promotion-column-samples .promotion-chip {
  background: #fff;
  border: 1px solid rgba(35, 127, 98, 0.18);
}

.promotion-import-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.promotion-import-summary > div {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.promotion-import-summary span {
  color: var(--muted);
  font-size: 0.78rem;
}

.promotion-import-summary strong {
  color: var(--ink);
  font-size: 1.35rem;
}

.promotion-import-details {
  display: grid;
  gap: 9px;
}

.promotion-import-note {
  padding: 12px 14px;
  border-radius: 9px;
  background: #f7f8f8;
  color: var(--muted);
  line-height: 1.4;
}

.promotion-import-note.is-error {
  background: #fff3f1;
  color: #9a3829;
}

.promotion-value-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
}

.promotion-value-input input {
  border-radius: 8px 0 0 8px;
}

.promotion-value-input span {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: #f5f7f7;
  color: var(--muted);
  font-weight: 900;
}

.promotion-checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbfb;
  cursor: pointer;
}

.promotion-checkbox-card input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--green);
}

.promotion-checkbox-card strong,
.promotion-checkbox-card small {
  display: block;
}

.promotion-checkbox-card small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

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

.promotion-review-item {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.promotion-review-item span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.promotion-review-item strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.promotion-review-confirmation {
  margin-top: 22px;
  border-color: rgba(35, 127, 98, 0.25);
  background: rgba(35, 127, 98, 0.06);
}

.promotion-editor-status {
  min-height: 20px;
}

.promotion-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.promotion-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.promotion-card-main {
  display: grid;
  gap: 11px;
}

.promotion-card-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.promotion-card-heading strong {
  color: var(--ink);
  font-size: 1.04rem;
}

.promotion-rule-badge {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(35, 127, 98, 0.1);
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.promotion-rule-badge.is-policy {
  background: rgba(37, 92, 153, 0.1);
  color: var(--blue);
}

.promotion-card-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--muted);
  font-size: 0.86rem;
}

.promotion-card-status {
  align-self: start;
  padding: 6px 9px;
  border-radius: 7px;
  background: #f3f5f5;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
}

.promotion-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  grid-column: 1 / -1;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

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

  .promotion-target-options,
  .promotion-target-panel,
  .promotion-form-grid,
  .promotion-column-grid,
  .promotion-review-grid {
    grid-template-columns: 1fr;
  }

  .promotion-form-full {
    grid-column: auto;
  }

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

@media (max-width: 520px) {
  .promotion-editor-step {
    min-height: 0;
    padding: 19px;
  }

  .promotion-step strong {
    font-size: 0.78rem;
  }

  .promotion-editor-actions,
  .promotion-upload-actions {
    display: grid;
  }

  .promotion-editor-actions .quote-button,
  .promotion-upload-actions .quote-button {
    width: 100%;
  }

  .promotion-card {
    grid-template-columns: 1fr;
  }
}


.promotion-exclusions { margin-top: 24px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; }
.promotion-exclusion-matches { display: flex; flex-wrap: wrap; gap: 8px; max-height: 200px; overflow: auto; margin: 12px 0; }
.promotion-exclusion-matches button, .promotion-exclusions .promotion-chip { border: 1px solid var(--line); background: white; padding: 9px 12px; border-radius: 10px; text-align: left; cursor: pointer; }
.promotion-exclusions .promotion-chip { background: #fff3ed; }
.promotion-exclusion-preview { max-height: 220px; overflow: auto; }
.promotion-exclusion-preview div { padding: 8px 0; border-bottom: 1px solid var(--line); }
.promotion-line-role { display: block; font-size: 12px; color: var(--green); margin-top: 4px; }
.commercial-promotion-notice { display: block; font-size: 12px; margin-top: 8px; min-height: 18px; }
