.nf-flow-nav-links {
  display: contents;
}

.nf-flow-preview-notice {
  margin-bottom: 20px;
}

.nf-flow-metrics {
  margin-bottom: 22px;
}

.nf-flow-master-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(330px, 0.72fr);
  gap: 20px;
  align-items: start;
}

.nf-flow-list-card,
.nf-flow-detail-card,
.nf-flow-review-card,
.nf-flow-approval-card {
  border-radius: 20px;
}

.nf-flow-list-card {
  padding: 0;
  overflow: hidden;
}

.nf-flow-filters {
  padding: 18px;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.nf-flow-table tbody tr {
  cursor: pointer;
}

.nf-flow-table tbody tr.selected {
  background: rgba(59, 130, 246, 0.08);
}

.nf-flow-person {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.nf-flow-person > b {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.12);
  color: #4338ca;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.nf-flow-person.large > b {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
  border-radius: 15px;
  font-size: 14px;
}

.nf-flow-person div {
  min-width: 0;
}

.nf-flow-person strong,
.nf-flow-person small {
  display: block;
}

.nf-flow-person small {
  margin-top: 3px;
  color: var(--muted, #6b7280);
}

.nf-flow-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.nf-flow-status i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

.nf-flow-status.neutral,
.nf-flow-label-chip.neutral {
  background: #f3f4f6;
  color: #4b5563;
}

.nf-flow-status.waiting,
.nf-flow-label-chip.waiting {
  background: #fff7ed;
  color: #c2410c;
}

.nf-flow-status.review,
.nf-flow-label-chip.review {
  background: #eff6ff;
  color: #1d4ed8;
}

.nf-flow-status.correction,
.nf-flow-label-chip.correction {
  background: #fef2f2;
  color: #b91c1c;
}

.nf-flow-status.emitting,
.nf-flow-label-chip.emitting {
  background: #f5f3ff;
  color: #6d28d9;
}

.nf-flow-status.error,
.nf-flow-label-chip.error {
  background: #fef2f2;
  color: #b91c1c;
}

.nf-flow-status.sent,
.nf-flow-label-chip.sent {
  background: #ecfdf5;
  color: #047857;
}

.nf-flow-detail-card {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
}

.nf-flow-detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.nf-flow-detail-heading h3 {
  margin: 2px 0 4px;
}

.nf-flow-detail-heading p {
  margin: 0;
  color: var(--muted, #6b7280);
}

.nf-flow-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.nf-flow-detail-grid > div,
.nf-flow-review-data > div {
  padding: 13px 14px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 14px;
  background: #fff;
}

.nf-flow-detail-grid small,
.nf-flow-review-data small {
  display: block;
  margin-bottom: 5px;
  color: var(--muted, #6b7280);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nf-flow-detail-grid strong,
.nf-flow-review-data strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.nf-flow-label-box,
.nf-flow-link-box,
.nf-flow-message-preview,
.nf-flow-label-transition {
  padding: 15px;
  border-radius: 15px;
  background: #f8fafc;
  border: 1px solid #e7edf4;
}

.nf-flow-label-box > small,
.nf-flow-link-box > small,
.nf-flow-message-preview > small,
.nf-flow-label-transition > span {
  display: block;
  margin-bottom: 9px;
  color: var(--muted, #6b7280);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nf-flow-label-box p,
.nf-flow-message-preview p {
  margin: 10px 0 0;
  color: var(--muted, #6b7280);
  font-size: 13px;
  line-height: 1.5;
}

.nf-flow-label-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.nf-flow-link-box code {
  display: block;
  padding: 10px 11px;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #334155;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nf-flow-detail-actions {
  display: grid;
  gap: 10px;
}

.nf-flow-inline-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.nf-flow-tabs {
  display: flex;
  gap: 7px;
  padding: 16px 18px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.nf-flow-tabs button {
  padding: 8px 11px;
  border: 0;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.nf-flow-tabs button.active {
  background: #111827;
  color: #fff;
}

.nf-flow-timeline {
  display: grid;
  gap: 0;
}

.nf-flow-timeline > div {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  min-height: 58px;
}

.nf-flow-timeline > div:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 25px;
  bottom: -2px;
  width: 2px;
  background: #e5e7eb;
}

.nf-flow-timeline i {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  color: #fff;
  font-style: normal;
  font-size: 11px;
}

.nf-flow-timeline .complete i {
  border-color: #10b981;
  background: #10b981;
}

.nf-flow-timeline p {
  margin: 1px 0 0;
}

.nf-flow-timeline strong,
.nf-flow-timeline small {
  display: block;
}

.nf-flow-timeline small {
  margin-top: 3px;
  color: var(--muted, #6b7280);
  line-height: 1.35;
}

.nf-flow-review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.42fr);
  gap: 22px;
  align-items: start;
}

.nf-flow-review-layout > div {
  display: grid;
  gap: 18px;
}

.nf-flow-review-card {
  padding: 22px;
}

.nf-flow-review-data {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.nf-flow-review-data .wide {
  grid-column: 1 / -1;
}

.nf-flow-approval-card {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 18px;
  padding: 22px;
}

.nf-flow-approval-card h3 {
  margin: 3px 0 6px;
}

.nf-flow-approval-card p {
  margin: 0;
  color: var(--muted, #6b7280);
  line-height: 1.5;
}

.nf-flow-label-transition {
  display: grid;
  justify-items: start;
  gap: 7px;
}

.nf-flow-label-transition > span {
  margin: 0;
}

.nf-flow-label-transition > b {
  color: #94a3b8;
  font-size: 18px;
}

.nf-flow-check {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 9px;
  align-items: start;
  color: #374151;
  font-size: 13px;
  line-height: 1.45;
}

.nf-flow-check input {
  margin-top: 2px;
}

.nf-flow-back-link {
  display: inline-block;
  margin-bottom: 8px;
  color: #4f46e5;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.nf-public-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.34fr);
  gap: 22px;
  align-items: start;
}

.nf-public-preview-bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
}

.nf-public-preview-bar span,
.nf-public-preview-bar strong {
  display: block;
}

.nf-public-preview-bar span {
  margin-bottom: 3px;
  color: #64748b;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nf-public-card,
.nf-public-automation-card {
  border-radius: 22px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.07);
}

.nf-public-card {
  padding: 28px;
}

.nf-public-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 22px;
  border-bottom: 1px solid #eef2f7;
}

.nf-public-brand > b {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: #111827;
  color: #fff;
}

.nf-public-brand strong,
.nf-public-brand small {
  display: block;
}

.nf-public-brand small {
  margin-top: 3px;
  color: #64748b;
}

.nf-public-heading {
  padding: 24px 0 20px;
}

.nf-public-heading > span {
  color: #4f46e5;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nf-public-heading h2 {
  margin: 7px 0 8px;
  font-size: 28px;
}

.nf-public-heading p {
  max-width: 700px;
  margin: 0;
  color: #64748b;
  line-height: 1.6;
}

.nf-public-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #eef2f7;
}

.nf-public-actions small {
  max-width: 360px;
  color: #64748b;
  line-height: 1.45;
}

.nf-public-automation-card {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.nf-public-automation-card h3 {
  margin: 0 0 2px;
}

.nf-public-automation-card > div {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
}

.nf-public-automation-card > div > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 12px;
  font-weight: 800;
}

.nf-public-automation-card p {
  margin: 0;
}

.nf-public-automation-card strong,
.nf-public-automation-card small {
  display: block;
}

.nf-public-automation-card small {
  margin-top: 4px;
  color: #64748b;
  line-height: 1.4;
}

.nf-public-success {
  display: grid;
  justify-items: center;
  max-width: 680px;
  margin: 50px auto;
  padding: 46px 36px;
  text-align: center;
  border: 1px solid #dbe7e0;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.nf-public-success-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 28px;
  font-weight: 900;
}

.nf-public-success > span {
  color: #047857;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nf-public-success h2 {
  margin: 8px 0 10px;
}

.nf-public-success > p {
  max-width: 500px;
  margin: 0;
  color: #64748b;
  font-size: 16px;
  line-height: 1.6;
}

.nf-public-success-preview {
  width: min(100%, 480px);
  margin: 24px 0;
  padding: 17px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.nf-public-success-preview > small {
  display: block;
  margin-bottom: 10px;
  color: #64748b;
  font-weight: 700;
}

.nf-public-success-preview p {
  margin: 10px 0 0;
  color: #64748b;
  font-size: 13px;
}

@media (max-width: 1180px) {
  .nf-flow-master-detail,
  .nf-flow-review-layout {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.62fr);
  }

  .nf-public-preview {
    grid-template-columns: 1fr;
  }

  .nf-public-automation-card {
    grid-column: 1;
  }
}

@media (max-width: 920px) {
  .nf-flow-master-detail,
  .nf-flow-review-layout {
    grid-template-columns: 1fr;
  }

  .nf-flow-detail-card,
  .nf-flow-approval-card {
    position: static;
  }

  .nf-flow-detail-grid,
  .nf-flow-review-data {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .nf-flow-detail-grid,
  .nf-flow-review-data,
  .nf-flow-inline-actions {
    grid-template-columns: 1fr;
  }

  .nf-flow-review-data .wide {
    grid-column: auto;
  }

  .nf-flow-detail-heading,
  .nf-public-preview-bar,
  .nf-public-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .nf-public-card {
    padding: 20px;
  }

  .nf-public-heading h2 {
    font-size: 24px;
  }
}
