.promotion-flow {
  --flow-ink: #102039;
  --flow-muted: #63758b;
  --flow-blue: #3b57ec;
  --flow-teal: #0b827b;
  --flow-line: #dfe7ef;
  display: grid;
  gap: 20px;
  min-width: 0;
  color: var(--flow-ink);
}
.flow-files {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  display: grid;
  gap: 8px;
}
.flow-files li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border: 1px solid var(--flow-line, #dfe7ef);
  background: #fff;
  padding: 12px;
  border-radius: 8px;
}
.flow-file-meta {
  flex: 1;
  min-width: 150px;
  overflow-wrap: anywhere;
}
.flow-file-meta strong,
.flow-file-meta small {
  display: block;
}
.flow-file-meta strong {
  font-size: 12px;
}
.flow-file-meta small {
  font-size: 11px;
  margin-top: 5px;
  color: #63758b;
}
.promotion-flow .flow-file-share {
  display: flex;
  align-items: center;
  gap: 6px;
}
.flow-file-share input {
  accent-color: #0b827b;
}
.flow-dropzone {
  border: 1px dashed #91a6bd;
  border-radius: 8px;
  padding: 18px;
  background: #f5f8fc;
  margin-top: 16px;
}
.flow-dropzone p,
.flow-dropzone small {
  font-size: 11px;
  line-height: 1.8;
  color: #63758b;
}
.flow-dropzone input[type="file"] {
  background: white;
  font-size: 12px;
}
.flow-dropzone:focus-within {
  outline: 2px solid #3b57ec;
  outline-offset: 2px;
}
.flow-upload-progress {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  font-size: 11px;
}
.flow-upload-progress progress {
  width: 100%;
  accent-color: #0b827b;
}
.flow-upload-queue {
  list-style: none;
  padding: 0;
  font-size: 11px;
  display: grid;
  gap: 6px;
}
.flow-upload-queue li {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  overflow-wrap: anywhere;
}
.flow-pending,
.flow-impact {
  background: #fff8e9;
  border: 1px solid #ead8ac;
  border-inline-start: 3px solid #b27a10;
  padding: 16px;
  border-radius: 6px;
  margin: 14px 0;
  font-size: 12px;
  line-height: 1.8;
}
.flow-pending .flow-actions {
  margin-top: 12px;
}
.flow-reversal {
  margin: 10px 0 20px;
}
.flow-deliveries {
  margin: 24px 0;
}
.flow-delivery {
  border: 1px solid #dfe7ef;
  border-inline-start: 3px solid #0b827b;
  border-radius: 7px;
  padding: 14px;
  margin: 10px 0;
  font-size: 12px;
}
.flow-delivery.withdrawn,
.flow-delivery.invalidated,
.flow-delivery.rejected {
  border-inline-start-color: #a68a62;
  background: #faf9f6;
}
.flow-delivery summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  cursor: pointer;
}
.flow-delivery summary small {
  color: #63758b;
}
.flow-delivery-note {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.8;
}
.flow-rollback-log {
  font-size: 12px;
  margin-top: 12px;
}
.flow-rollback-log article {
  padding: 12px;
  border-bottom: 1px solid #dfe7ef;
  overflow-wrap: anywhere;
}
.flow-image-preview {
  padding: 20px;
  display: flex;
  justify-content: center;
}
.flow-image-preview img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}
@media (max-width: 640px) {
  .flow-files li {
    align-items: flex-start;
  }
  .flow-file-meta {
    flex-basis: 100%;
  }
  .flow-delivery summary small {
    flex-basis: 100%;
  }
}
.flow-heading,
.flow-card-title,
.flow-toolbar,
.flow-actions,
.flow-inbox {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.flow-heading h2 {
  font-size: 23px;
  letter-spacing: -0.03em;
  margin: 8px 0;
}
.flow-heading p,
.flow-panel > p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--flow-muted);
  margin: 7px 0;
}
.flow-actions {
  justify-content: flex-start;
  gap: 8px;
}
.flow-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.flow-metrics article {
  border: 1px solid var(--flow-line);
  padding: 18px;
  background: #fff;
  border-radius: 10px;
}
.flow-metrics span {
  display: block;
  color: var(--flow-muted);
  font-size: 11px;
}
.flow-metrics strong {
  display: block;
  margin-top: 8px;
  font:
    600 24px ui-monospace,
    monospace;
  overflow-wrap: anywhere;
}
.flow-panel {
  min-width: 0;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--flow-line);
  border-radius: 12px;
}
.flow-panel h3 {
  font-size: 16px;
  margin: 0 0 12px;
}
.flow-toolbar {
  margin-bottom: 18px;
}
.flow-toolbar h3 {
  margin-right: auto;
}
.promotion-flow label,
.flow-editor label {
  display: grid;
  gap: 7px;
  min-width: 0;
  font-size: 11px;
  color: var(--flow-muted);
}
.promotion-flow input:not([type="checkbox"]),
.promotion-flow select,
.promotion-flow textarea,
.flow-editor input,
.flow-editor select,
.flow-editor textarea {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  min-height: 38px;
  box-sizing: border-box;
  border: 1px solid var(--flow-line);
  border-radius: 7px;
  padding: 9px 11px;
  background: white;
  color: var(--flow-ink, #102039);
  font: 12px inherit;
}
.promotion-flow textarea,
.flow-editor textarea {
  line-height: 1.8;
  resize: vertical;
}
.flow-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.flow-editor {
  padding: 22px;
  display: grid;
  gap: 16px;
  --flow-line: #dfe7ef;
  --flow-muted: #63758b;
}
.flow-editor .flow-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--flow-line);
  padding-top: 14px;
}
.flow-hint {
  font-size: 11px;
  line-height: 1.8;
  color: var(--flow-muted, #63758b);
}
.flow-table-wrap {
  overflow-x: auto;
  max-width: 100%;
}
.flow-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
  font-size: 12px;
}
.flow-table-wrap th {
  text-align: left;
  font-size: 10px;
  color: var(--flow-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--flow-line);
  padding: 12px;
}
.flow-table-wrap td {
  padding: 14px 12px;
  border-bottom: 1px solid #edf1f5;
  vertical-align: middle;
}
.flow-table-wrap tr.selected {
  background: #f2f6fd;
}
.flow-table-wrap td strong,
.flow-table-wrap td small {
  display: block;
  max-width: 260px;
  overflow-wrap: anywhere;
}
.flow-table-wrap td small {
  color: var(--flow-muted);
  font-size: 10px;
  margin-top: 5px;
}
.flow-status {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 5px;
  background: #eef4ff;
  color: #365da4;
  font-size: 11px;
  white-space: nowrap;
}
.flow-inbox {
  padding: 18px 0;
  border-top: 1px solid var(--flow-line);
  align-items: flex-start;
}
.flow-inbox > div {
  min-width: 0;
  flex: 1;
}
.flow-inbox strong,
.flow-inbox small {
  display: block;
}
.flow-inbox small {
  font-size: 11px;
  color: var(--flow-muted);
  margin-top: 7px;
}
.flow-inbox p {
  font-size: 12px;
  line-height: 1.8;
  overflow-wrap: anywhere;
  white-space: pre-line;
}
.flow-empty {
  text-align: center;
  padding: 25px;
  color: var(--flow-muted);
  font-size: 12px;
}
.flow-error {
  border: 1px solid #f1c2c2;
  border-radius: 8px;
  padding: 12px;
  background: #fff5f5;
  color: #ac3535;
  font-size: 12px;
  line-height: 1.8;
}
.flow-notice {
  border-left: 3px solid var(--flow-teal, #0b827b);
  padding: 12px 16px;
  background: #f0f8f7;
  color: #32615c;
  font-size: 12px;
  line-height: 1.8;
}
.flow-budget {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.flow-amount span {
  display: block;
  font-size: 11px;
  color: var(--flow-muted);
}
.flow-amount strong {
  display: block;
  margin-top: 6px;
  font:
    600 19px ui-monospace,
    monospace;
}
.flow-plan-summary {
  border: 1px solid var(--flow-line);
  border-radius: 9px;
  padding: 18px;
  margin: 14px 0;
}
.flow-plan-summary > p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--flow-muted);
}
.flow-plan-summary > a {
  display: inline-block;
  margin: 8px 15px 8px 0;
  font-size: 12px;
  color: var(--flow-blue);
}
.flow-detail > p {
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.flow-stages {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  list-style: none;
  padding: 0;
  margin: 22px 0;
  gap: 0;
}
.flow-stages li {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  font-size: 10px;
  line-height: 1.5;
  color: #7a8899;
  min-width: 0;
  padding-right: 8px;
}
.flow-stages li:before {
  position: absolute;
  content: "";
  height: 2px;
  left: 25px;
  right: 0;
  top: 11px;
  background: #e4eaf0;
}
.flow-stages li:last-child:before {
  display: none;
}
.flow-stages li > span {
  position: relative;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eaf0f6;
  font:
    600 10px ui-monospace,
    monospace;
}
.flow-stages li.done {
  color: var(--flow-teal);
}
.flow-stages li.done:before {
  background: #7cc7bd;
}
.flow-stages li.done > span {
  background: #e3f4f0;
  color: var(--flow-teal);
}
.flow-stages li.current {
  color: var(--flow-blue);
  font-weight: 600;
}
.flow-stages li.current > span {
  color: #fff;
  background: var(--flow-blue);
}
.flow-node-form {
  padding: 20px;
  border: 1px solid #d9e4fa;
  background: #f6f9ff;
  border-radius: 9px;
  display: grid;
  gap: 14px;
  margin: 22px 0;
}
.flow-node-form > .button {
  justify-self: start;
}
.flow-expenses {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}
.flow-expenses article {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 0;
  border-bottom: 1px solid var(--flow-line);
  font-size: 12px;
}
.flow-expenses article small {
  margin-left: auto;
  color: var(--flow-muted);
}
.flow-history {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}
.flow-history li {
  border-left: 2px solid #d8e6e6;
  padding: 4px 0 18px 18px;
  position: relative;
  font-size: 12px;
}
.flow-history li:before {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  background: #0b827b;
  border: 3px solid #e3f4f0;
  border-radius: 50%;
  left: -7px;
  top: 5px;
}
.flow-history li div {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.flow-history small {
  color: var(--flow-muted);
  font-size: 10px;
}
.flow-history p {
  white-space: pre-line;
  overflow-wrap: anywhere;
  line-height: 1.8;
  color: #586c80;
}
.flow-history a,
.flow-panel summary {
  font-size: 12px;
  color: #365da4;
}
.flow-panel summary {
  cursor: pointer;
  margin: 14px 0;
}
.flow-matcher {
  padding: 22px;
  min-width: 0;
}
.modal:has(.flow-matcher) {
  width: min(1180px, calc(100vw - 36px));
  max-width: none;
}
.flow-matcher .match-result-toolbar > label[aria-label] {
  min-width: 0;
}
.promotion-flow :focus-visible,
.flow-editor :focus-visible {
  outline: 2px solid #3b57ec;
  outline-offset: 3px;
}
@media (max-width: 1000px) {
  .flow-stages {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
  .flow-stages li:nth-child(3n):before {
    display: none;
  }
  .flow-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .flow-heading h2 {
    font-size: 20px;
  }
  .flow-panel,
  .flow-editor,
  .flow-matcher {
    padding: 14px;
  }
  .flow-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .flow-metrics {
    gap: 9px;
  }
  .flow-metrics article {
    padding: 13px;
  }
  .flow-metrics strong {
    font-size: 18px;
  }
  .flow-toolbar > label {
    width: 100%;
  }
  .flow-node-form {
    padding: 14px;
  }
  .flow-budget {
    gap: 18px;
  }
  .flow-plan-summary {
    padding: 12px;
  }
  .flow-inbox {
    flex-direction: column;
  }
  .flow-history small {
    width: 100%;
  }
  .flow-stages {
    font-size: 10px;
  }
}
