/* Sales workflow panel adapted from the supplied Sales how-it-works archive. */
.hiw-automation-panel {
  flex: 1;
  min-height: 260px;
  margin-top: 18px;
  padding: 22px 22px 18px;
  border: 1px solid #dceaff;
  border-radius: 20px;
  background: linear-gradient(145deg, #f7fbff, #edf5ff 72%, #f9fcff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.hiw-automation-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.hiw-automation-kicker {
  color: #3980dd;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.hiw-automation-heading h3 {
  margin: 5px 0 0;
  color: #142b4d;
  font-size: 20px;
  line-height: 1.2;
}

.hiw-live-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid #ccebdc;
  border-radius: 999px;
  background: #f5fff9;
  color: #16814d;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.hiw-live-status span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #20bb72;
  box-shadow: 0 0 0 4px rgba(32, 187, 114, 0.12);
}

.hiw-automation-track {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 34px;
}

.hiw-automation-line {
  position: absolute;
  top: 17px;
  right: 30px;
  left: 30px;
  height: 2px;
  background: repeating-linear-gradient(90deg, #9bc4f4 0 8px, transparent 8px 14px);
}

.hiw-automation-node {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-align: center;
}

.hiw-automation-node-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 5px solid #f5faff;
  border-radius: 50%;
  background: #287bed;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(40, 123, 237, 0.24);
}

.hiw-automation-node--orange .hiw-automation-node-icon { background: #f39a22; box-shadow: 0 4px 12px rgba(243, 154, 34, 0.24); }

.hiw-automation-node--green .hiw-automation-node-icon { background: #18ad6c; box-shadow: 0 4px 12px rgba(24, 173, 108, 0.24); }

.hiw-automation-node strong,
.hiw-automation-node small {
  display: block;
}

.hiw-automation-node strong {
  color: #193558;
  font-size: 13px;
}

.hiw-automation-node small {
  margin-top: 4px;
  color: #7890ad;
  font-size: 11px;
}

.hiw-automation-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 30px;
  padding-top: 15px;
  border-top: 1px solid #d9e8f8;
  color: #7890ad;
  font-size: 11px;
  text-align: center;
}

.hiw-automation-footer b {
  display: block;
  margin-bottom: 3px;
  color: #287bed;
  font-size: 18px;
}

.hiw-automation-insight {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed #cbdff4;
}

.hiw-automation-insight-label {
  display: block;
  margin-bottom: 10px;
  color: #3980dd;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
}

.hiw-automation-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hiw-automation-action {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 8px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(190, 215, 241, 0.8);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
}

.hiw-automation-action-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #e8f2ff;
  color: #287bed;
  font-size: 9px;
  font-weight: 800;
}

.hiw-automation-action strong,
.hiw-automation-action small {
  display: block;
}

.hiw-automation-action strong {
  color: #193558;
  font-size: 11px;
}

.hiw-automation-action small {
  margin-top: 2px;
  color: #7890ad;
  font-size: 9px;
  line-height: 1.3;
}

.hiw-automation-action-arrow {
  flex-shrink: 0;
  color: #7daee8;
  font-size: 16px;
}

.hiw-automation-dashboard {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr;
  gap: 14px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #d9e8f8;
}

.hiw-automation-activity,
.hiw-automation-health {
  padding: 15px;
  border: 1px solid rgba(190, 215, 241, 0.8);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
}

.hiw-automation-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #3980dd;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
}

.hiw-automation-pulse {
  color: #18a66a;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0;
}

.hiw-automation-event {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 9px;
  align-items: center;
  margin-top: 13px;
}

.hiw-automation-event-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(40, 123, 237, 0.1);
}

.hiw-automation-event-dot--blue { background: #287bed; }

.hiw-automation-event-dot--orange { background: #f39a22; box-shadow: 0 0 0 4px rgba(243, 154, 34, 0.1); }

.hiw-automation-event-dot--green { background: #18ad6c; box-shadow: 0 0 0 4px rgba(24, 173, 108, 0.1); }

.hiw-automation-event strong,
.hiw-automation-event small {
  display: block;
}

.hiw-automation-event strong {
  color: #193558;
  font-size: 11px;
}

.hiw-automation-event small,
.hiw-automation-event time {
  color: #7890ad;
  font-size: 9px;
}

.hiw-automation-event small {
  margin-top: 2px;
  line-height: 1.35;
}

.hiw-automation-event time {
  white-space: nowrap;
}

.hiw-automation-section-heading strong {
  color: #18a66a;
  font-size: 18px;
  letter-spacing: 0;
}

.hiw-automation-progress {
  height: 8px;
  margin: 20px 0 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dceafb;
}

.hiw-automation-progress span {
  display: block;
  width: 98%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #287bed, #18ad6c);
}

.hiw-automation-health p {
  margin: 0;
  color: #7890ad;
  font-size: 10px;
  line-height: 1.45;
}

.hiw-automation-health-stats {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid #d9e8f8;
  color: #7890ad;
  font-size: 9px;
}

.hiw-automation-health-stats b {
  margin-right: 4px;
  color: #193558;
  font-size: 13px;
}

.hiw-automation-command-center {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 18px;
  margin-top: 22px;
  padding: 20px 18px;
  border: 1px solid #cfe2f8;
  border-radius: 16px;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.82), rgba(239, 247, 255, 0.7));
}

.hiw-automation-command-copy .hiw-automation-insight-label {
  margin: 0 0 6px;
  text-align: left;
}

.hiw-automation-command-copy h4 {
  margin: 0;
  color: #193558;
  font-size: 16px;
}

.hiw-automation-command-copy p {
  max-width: 270px;
  margin: 7px 0 14px;
  color: #7890ad;
  font-size: 10px;
  line-height: 1.5;
}

.hiw-automation-command-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #193558;
  font-size: 10px;
  font-weight: 700;
}

.hiw-automation-owner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hiw-automation-owner span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e5efff;
  color: #287bed;
  font-size: 8px;
}

.hiw-automation-due {
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff4dd;
  color: #b87510;
  font-size: 9px;
}

.hiw-automation-command-progress {
  align-self: center;
  padding-left: 18px;
  border-left: 1px solid #d9e8f8;
}

.hiw-automation-command-progress-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  color: #3980dd;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
}

.hiw-automation-command-progress-heading strong {
  color: #18a66a;
  font-size: 13px;
  letter-spacing: 0;
}

.hiw-automation-coverage-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
  margin-top: 9px;
  color: #526f91;
  font-size: 9px;
}

.hiw-automation-coverage-row b {
  color: #18a66a;
  font-size: 9px;
}

.hiw-automation-coverage-row i {
  display: block;
  grid-column: 1 / -1;
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: #dceafb;
}

.hiw-automation-coverage-row em {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #35b987;
}

@media (max-width: 768px) {
  .hiw-automation-heading h3 {
    font-size: 16px;
  }

  .hiw-automation-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hiw-automation-dashboard {
    grid-template-columns: 1fr;
  }

  .hiw-automation-command-center {
    grid-template-columns: 1fr;
  }

  .hiw-automation-command-progress {
    padding-top: 16px;
    padding-left: 0;
    border-top: 1px solid #d9e8f8;
    border-left: 0;
  }

  .hiw-automation-action-arrow {
    align-self: center;
    transform: rotate(90deg);
  }
}
/* Keep the archive workflow compact and protect long Sales stage labels. */
.section-how-it-works .hiw-flow-card {
  justify-content: flex-start;
  gap: 10px;
}
.section-how-it-works .hiw-main-grid {
  width: 100%;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr);
}
.section-how-it-works .hiw-flow-row,
.section-how-it-works .hiw-stages-list,
.section-how-it-works .hiw-stage-copy,
.section-how-it-works .hiw-step-box,
.hiw-automation-panel,
.hiw-automation-panel div {
  min-width: 0;
}
.section-how-it-works .hiw-step-box {
  white-space: normal;
  overflow-wrap: anywhere;
}
.hiw-automation-panel {
  text-align: left;
}
.hiw-automation-heading,
.hiw-automation-command-meta {
  flex-wrap: wrap;
}
.hiw-automation-panel :is(strong, small, h3, h4, p) {
  overflow-wrap: anywhere;
}
.hiw-automation-dashboard {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.8fr);
}
.hiw-automation-command-center {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}
@media (max-width: 1024px) {
  .section-how-it-works .hiw-main-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 768px) {
  .hiw-automation-dashboard,
  .hiw-automation-command-center {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 480px) {
  .hiw-automation-panel { padding: 16px 12px; }
  .hiw-automation-track { gap: 8px; }
  .hiw-automation-footer { grid-template-columns: minmax(0, 1fr); }
  .hiw-automation-event { grid-template-columns: auto minmax(0, 1fr); }
  .hiw-automation-event time { grid-column: 2; }
}
