.expense-case-timeline {
  min-width: 0;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
}

.expense-case-timeline-head,
.expense-case-timeline-title-row,
.expense-case-meta,
.expense-case-event-meta {
  display: flex;
  align-items: center;
}

.expense-case-timeline-head {
  justify-content: space-between;
  gap: 18px;
}

.expense-case-timeline-title-row {
  flex-wrap: wrap;
  gap: 9px;
}

.expense-case-timeline h4 {
  margin: 0;
  color: #0f172a;
  font-size: 14px;
  font-weight: 850;
}

.expense-case-timeline-head p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.55;
}

.expense-case-stage {
  padding: 3px 8px;
  border: 1px solid rgba(var(--theme-primary-rgb), .2);
  border-radius: 999px;
  background: var(--theme-primary-soft);
  color: var(--theme-primary-active);
  font-size: 11px;
  font-weight: 800;
}

.expense-case-meta {
  flex-wrap: wrap;
  gap: 0;
}

.expense-case-meta span + span::before {
  content: "·";
  margin: 0 7px;
  color: #cbd5e1;
}

.expense-case-refresh {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.expense-case-refresh:hover:not(:disabled) {
  border-color: rgba(var(--theme-primary-rgb), .34);
  color: var(--theme-primary-active);
}

.expense-case-refresh:disabled {
  cursor: wait;
  opacity: .62;
}

.expense-case-timeline-body {
  min-height: 58px;
  margin-top: 15px;
}

.expense-case-state {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
}

.expense-case-state > i {
  flex: 0 0 auto;
  color: var(--theme-primary);
  font-size: 21px;
}

.expense-case-state div {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 3px;
}

.expense-case-state strong {
  color: #334155;
  font-size: 12px;
}

.expense-case-state.error {
  border-color: #fecaca;
  background: #fff7f7;
}

.expense-case-state.error > i {
  color: #dc2626;
}

.expense-case-state button {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 0;
  border-radius: 7px;
  background: var(--theme-primary);
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.expense-case-event-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.expense-case-event {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 0 0 18px;
}

.expense-case-event:last-child {
  padding-bottom: 0;
}

.expense-case-event:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 31px;
  bottom: 2px;
  left: 16px;
  width: 2px;
  background: #e2e8f0;
}

.expense-case-event-icon {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--theme-primary-rgb), .2);
  border-radius: 999px;
  background: var(--theme-primary-soft);
  color: var(--theme-primary-active);
  font-size: 17px;
}

.expense-case-event.success .expense-case-event-icon {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.expense-case-event.warning .expense-case-event-icon {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.expense-case-event-copy {
  min-width: 0;
  padding-top: 1px;
}

.expense-case-event-copy > strong {
  display: block;
  color: #1e293b;
  font-size: 13px;
  line-height: 1.45;
}

.expense-case-event-copy > p {
  margin: 4px 0 7px;
  color: #475569;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.expense-case-event-meta {
  flex-wrap: wrap;
  gap: 6px 14px;
  color: #94a3b8;
  font-size: 11px;
}

.expense-case-event-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

@media (max-width: 720px) {
  .expense-case-timeline-head {
    align-items: flex-start;
  }

  .expense-case-refresh span {
    display: none;
  }

  .expense-case-refresh {
    padding: 7px 9px;
  }

  .expense-case-state {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .expense-case-state button {
    margin-left: 33px;
  }
}
